Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Node SDK typescript typing mismatch #726

Closed
2 tasks done
YandiBanyuKarimaWaly opened this issue Oct 16, 2023 · 1 comment · Fixed by #727
Closed
2 tasks done

🐛 Bug Report: Node SDK typescript typing mismatch #726

YandiBanyuKarimaWaly opened this issue Oct 16, 2023 · 1 comment · Fixed by #727
Assignees
Labels
bug Something isn't working

Comments

@YandiBanyuKarimaWaly
Copy link

👟 Reproduction steps

Assume using pnpm package manager:

  1. pnpm init
  2. pnpm add -D typescript @types/node
  3. pnpm add node-appwrite
  4. pnpm tsc --init
  5. Now, create a new file index.ts with this content:
import { Role } from 'node-appwrite'

Role.label('hello world')
  1. pnpm tsc index.ts

Then the error shows up:
index.ts:3:6 - error TS2339: Property 'label' does not exist on type 'typeof Role'.

👍 Expected behavior

Role.label is defined (I look at the generated .js file, it is there) so it should be on the index.d.ts file

👎 Actual Behavior

Role.label is not on the index.d.ts file

🎲 Appwrite version

Version 0.11.x

💻 Operating system

Linux

🧱 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?

@YandiBanyuKarimaWaly YandiBanyuKarimaWaly added the bug Something isn't working label Oct 16, 2023
@stnguyen90
Copy link
Contributor

@YandiBanyuKarimaWaly thanks for raising this issue! 🙏🏼 It looks like it's missing from our template:

export class Role {
static any(): string;
static user(id: string, status?: string): string;
static users(status?: string): string;
static guests(): string;
static team(id: string, role?: string): string;
static member(id: string): string;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants