🐛 Bug Report: TablesDB is exported at runtime but missing from ESM typings (index.d.mts)

Open Beginner friendly
#132 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
node.js, typescript
Domain
api

Research direction

Start with the ESM typings entrypoint in dist/index.d.mts and compare its service exports with the runtime export and nearby entries such as Account, Databases, and Storage. Update the typings so the TablesDB import is available, then verify that TypeScript accepts import { TablesDB } from "node-appwrite".

Written by the indexing model from the issue text.

Description

bug
👟 Reproduction steps

TablesDB is available at runtime from node-appwrite, but it is not exported in the ESM typings entrypoint (index.d.mts), which causes TypeScript import errors.

This leads to a mismatch between the runtime API and the type definitions.

👍 Expected behavior

TypeScript users should be able to import TablesDB the same way as other services:

import { TablesDB } from "node-appwrite";

Actual behavior

TypeScript reports that TablesDB is not exported:

Module '"node-appwrite"' has no exported member 'TablesDB'.

👎 Actual Behavior

Runtime export exists

In dist/index.js:

Object.defineProperty(exports, 'TablesDB', {
  enumerable: true,
  get: function () { return tablesDb.TablesDB; }
});

Typings export is missing

In dist/index.d.mts, TablesDB is not exported, while other services are:

export { Account } from './services/account.mjs';
export { Databases } from './services/databases.mjs';
export { Storage } from './services/storage.mjs';

// TablesDB missing

🎲 Appwrite version

Version 0.10.x

💻 Operating system

Windows

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?
  • I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
Dominant language
TypeScript
Stars
257
Forks
45
Avg merge
11h 59m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

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 appwrite/sdk-for-node

All issues in appwrite/sdk-for-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.