-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
typescript: empty typeParameters and typeArguments #5839
Copy link
Copy link
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.type:testsIssues about tests that are not correct, should be added, or similarIssues about tests that are not correct, should be added, or similar
Metadata
Metadata
Assignees
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.type:testsIssues about tests that are not correct, should be added, or similarIssues about tests that are not correct, should be added, or similar
Prettier 1.16.4
Due to inconsistency in reported ast by typescript parser, there is issue with some of typeParameters and typeArguments, in some cases parser outputs
TSTypeParameterInstantiationandTSTypeParameterDeclarationwith empty array ofparamsin PR https://github.com/typescript-eslint/typescript-eslint/pull/223i proposed change to make all occurrences of this consistent across all nodes. It means that all occurrences of
<>are going to lead to crash in this package, as opposed to only sometimes.TSTypeParameterInstantiationandTSTypeParameterDeclarationwith empty array ofparamsshould be supportedPlayground link
AST Structure
Input:
Output:
Reference: