Skip to content

Fix class and method signatures in typings#76

Open
yuna0x0 wants to merge 1 commit intoAurelicButter:masterfrom
yuna0x0:fix-type
Open

Fix class and method signatures in typings#76
yuna0x0 wants to merge 1 commit intoAurelicButter:masterfrom
yuna0x0:fix-type

Conversation

@yuna0x0
Copy link

@yuna0x0 yuna0x0 commented Mar 21, 2025

Description

The TypeScript type declaration file has various errors, which makes the library unusable under TypeScript.

Inconsistent letter case:

  • Usage in code comment differ from those in the docs.
  • Class name letter case not matching the source code.
  • Using non-primitive boxed objects instead of primitive types (ref)

Typo:

  • getBirthdayCharacter() -> getBirthdayCharacters()

Missing or incorrect arguments:

-update(options: UserOptions): Promise<UserProfileOptions>;
update(options: UserOptionsInput): Promise<UserProfileOptions>;

-getBirthdayCharacter(page: number): Promise<PersonRelation[]>;
getBirthdayCharacters(page?: number): Promise<PersonRelation[]>;

-getBirthdayStaff(page: number): Promise<PersonRelation[]>;
getBirthdayStaff(page?: number): Promise<PersonRelation[]>;

-postText(text: string, id?:number): Promise<TextActivity>;
postText(text: string, id: number | null): Promise<TextActivity>;

-postMessage(text: string, recipientId: number, isPrivate?:boolean, id?: number): Promise<MessageActivity>;
postMessage(text: string, recipientId: number, isPrivate?:boolean, id: number | null): Promise<MessageActivity>;

-getList(mediaID: Number)
getList(mediaID: number, page?: number, perPage?: number)

-getComments(id: number, page: number, perPage: number)
getComments(id: number, page?: number, perPage?: number)

@yuna0x0 yuna0x0 force-pushed the fix-type branch 5 times, most recently from f1bd5b4 to 3eaeecf Compare March 21, 2025 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant