clients/Rocketchat.ts re-exports nothing: `export *` does not forward a default export

Open
#258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
tooling

Research direction

Start by checking whether clients/Rocketchat.ts is a supported entry point for the app, then compare it with index.ts and lib/clients/Rocketchat.ts. Decide whether the shim should expose the client or be removed, and verify the chosen behavior with a focused import check since no test currently covers this path.

Written by the indexing model from the issue text.

Description

clients/Rocketchat.ts at the repo root is a one-line deep-import shim:

export * from '../lib/clients/Rocketchat'

lib/clients/Rocketchat.ts declares only a default export:

export default class RocketChatClient extends ClientRest implements ISocket {

export * does not forward a default export, so the shim's export surface is empty. A consumer reaching for the deep path gets nothing:

  • import Rocketchat from '@rocket.chat/sdk/clients/Rocketchat' — undefined
  • import { RocketChatClient } from '@rocket.chat/sdk/clients/Rocketchat' — not exported either

Verified at runtime: importing the shim as a namespace and reading Object.keys returns [].

The root interfaces/index.ts is unaffected — it holds the real declarations rather than re-exporting, and lib/ imports it directly.

index.ts is the working entry point (import Rocketchat from './lib/clients/Rocketchat'), so nothing inside this repo depends on the shim, and no test covers it. Whether the fix is export { default } from '../lib/clients/Rocketchat' or deleting the shim depends on whether the deep path is a supported entry point for the app — that is the call to make first.

Dominant language
TypeScript
Stars
146
Forks
101
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/Rocket.Chat.js.SDK

All issues in RocketChat/Rocket.Chat.js.SDK

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.