Bug Report
Current Behavior
Ast structure is inconsistent for function like nodes.
requested change
- property
params should be renamed to parameters
- property
typeAnnotation should be renamed to returnType if used as return type
affected nodes
TSCallSignatureDeclaration
TSConstructSignatureDeclaration
TSFunctionType
TSConstructorType
TSMethodSignature
Input Code
interface A {
(a: string): string
new(a: string): string
}
Other function like nodes (FunctionExpression, ArrowFunctionExpression, FunctionDeclaration, ....) have properties:
typeParameters
params
returnType
Estree
https://github.com/estree/estree/blob/master/extensions/type-annotations.md#functions
Environment
- Babel version(s): 7.2.3
- Node/npm version: 6-11
- OS: win/linux
- Monorepo: no
- How you are using Babel: cli
Bug Report
Current Behavior
Ast structure is inconsistent for function like nodes.
requested change
paramsshould be renamed toparameterstypeAnnotationshould be renamed toreturnTypeif used as return typeaffected nodes
TSCallSignatureDeclarationTSConstructSignatureDeclarationTSFunctionTypeTSConstructorTypeTSMethodSignatureInput Code
Other function like nodes (FunctionExpression, ArrowFunctionExpression, FunctionDeclaration, ....) have properties:
typeParametersparamsreturnTypeEstree
https://github.com/estree/estree/blob/master/extensions/type-annotations.md#functions
Environment