Skip to content

chore(docs): fixing documentation#14470

Open
m1ga wants to merge 1 commit into
mainfrom
fixDocsTS
Open

chore(docs): fixing documentation#14470
m1ga wants to merge 1 commit into
mainfrom
fixDocsTS

Conversation

@m1ga

@m1ga m1ga commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

While creating a new update for DefinetlyTyped I found some issues:

  1. Fixing the generator: update typescript docgen docs-devkit#262
  2. Fixing two places in the docs (this PR)

It looks like the generator has special cases for the three events ('addEventListener', 'removeEventListener', 'fireEvent') and outputs them twice when you put them in the exclude part.

This PR will add remove them from the exclude part (not 100% correct but the tests will pass, have to adjust that in the future).

Errors from the DefinetlyTyped test tool that are fix with this PR:

17851:5    error  TypeScript@5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Duplicate identifier 'addEventListener'                                                                                                                                                                                                                                          @definitelytyped/expect

  17851:5    error  TypeScript@5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Subsequent property declarations must have the same type.  Property 'addEventListener' must be of type '<K extends keyof CollapseToolbarEventMap>(name: K, callback: (this: CollapseToolbar, event: CollapseToolbarEventMap[K]) => void) => void', but here has type 'never'     @definitelytyped/expect

  17876:5    error  TypeScript@5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Duplicate identifier 'fireEvent'                                                                                                                                                                                                                                                 @definitelytyped/expect

  17876:5    error  TypeScript@5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Subsequent property declarations must have the same type.  Property 'fireEvent' must be of type '<K extends keyof CollapseToolbarEventMap>(name: K, event?: CollapseToolbarEventMap[K]) => void', but here has type 'never'                                                      @definitelytyped/expect

  17911:5    error  TypeScript@5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Duplicate identifier 'removeEventListener'                                                                                                                                                                                                                                       @definitelytyped/expect

  17911:5    error  TypeScript@5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Subsequent property declarations must have the same type.  Property 'removeEventListener' must be of type '<K extends keyof CollapseToolbarEventMap>(name: K, callback: (this: CollapseToolbar, event: CollapseToolbarEventMap[K]) => void) => void', but here has type 'never'  @definitelytyped/expect

  64823:150  error  void is only valid as a return type or generic type argument or the type of a `this` parameter                                                                                                                                                                                                                                      @typescript-eslint/no-invalid-void-type

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