-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docgen: Fix arrow functions and TS index module support (#30028)
* docgen: Detect TS index modules * docgen: Handle arrow function annotations * Refactor restParam to explicitly only handle one rest param * Use more descriptive and singular names for target file cases * Fix constructor missing return type * Simplify rest param handling
- Loading branch information
1 parent
e12881c
commit cf2da33
Showing
5 changed files
with
454 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/docgen/test/fixtures/type-annotations/arrow-function/example.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const fn = ( | ||
callback: ( foo: string, ...rest: any[] ) => GenericType< T > | ||
): void => {}; |
Oops, something went wrong.