@@ -112,7 +112,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
112
112
113
113
/**
114
114
* Converts a ts.Node's typeArguments ts.NodeArray to a flow-like typeParameters node
115
- * @param {ts.NodeArray } typeArguments ts.Node typeArguments
115
+ * @param {ts.NodeArray<any> } typeArguments ts.Node typeArguments
116
116
* @returns {ESTreeNode } TypeParameterInstantiation node
117
117
*/
118
118
function convertTypeArgumentsToTypeParameters (
@@ -239,10 +239,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
239
239
/**
240
240
* Converts a child into a class implements node. This creates an intermediary
241
241
* ClassImplements node to match what Flow does.
242
- * @param {ts.Node } child The TypeScript AST node to convert.
242
+ * @param {ts.ExpressionWithTypeArguments } child The TypeScript AST node to convert.
243
243
* @returns {ESTreeNode } The type annotation node.
244
244
*/
245
- function convertClassImplements ( child : any ) : ESTreeNode {
245
+ function convertClassImplements ( child : ts . ExpressionWithTypeArguments ) : ESTreeNode {
246
246
const id = convertChild ( child . expression ) as ESTreeNode ;
247
247
const classImplementsNode : ESTreeNode = {
248
248
type : AST_NODE_TYPES . ClassImplements ,
@@ -260,10 +260,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
260
260
261
261
/**
262
262
* Converts a child into a interface heritage node.
263
- * @param {ts.Node } child The TypeScript AST node to convert.
263
+ * @param {ts.ExpressionWithTypeArguments } child The TypeScript AST node to convert.
264
264
* @returns {ESTreeNode } The type annotation node.
265
265
*/
266
- function convertInterfaceHeritageClause ( child : any ) : ESTreeNode {
266
+ function convertInterfaceHeritageClause ( child : ts . ExpressionWithTypeArguments ) : ESTreeNode {
267
267
const id = convertChild ( child . expression ) as ESTreeNode ;
268
268
const classImplementsNode : ESTreeNode = {
269
269
type : AST_NODE_TYPES . TSInterfaceHeritage ,
@@ -332,7 +332,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
332
332
const customType = `TS${ SyntaxKind [ node . kind ] } ` ;
333
333
/**
334
334
* If the "errorOnUnknownASTType" option is set to true, throw an error,
335
- * otherwise fallback to just inlcuding the unknown type as-is.
335
+ * otherwise fallback to just including the unknown type as-is.
336
336
*/
337
337
if (
338
338
additionalOptions . errorOnUnknownASTType &&
@@ -387,10 +387,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
387
387
388
388
/**
389
389
* Converts a TypeScript JSX node.tagName into an ESTree node.name
390
- * @param {Object } tagName the tagName object from a JSX ts.Node
390
+ * @param {ts.JsxTagNameExpression } tagName the tagName object from a JSX ts.Node
391
391
* @returns {Object } the converted ESTree name object
392
392
*/
393
- function convertTypeScriptJSXTagNameToESTreeName ( tagName : any ) : any {
393
+ function convertTypeScriptJSXTagNameToESTreeName ( tagName : ts . JsxTagNameExpression ) : ESTreeNode {
394
394
const tagNameToken = nodeUtils . convertToken ( tagName , ast ) ;
395
395
396
396
if ( tagNameToken . type === AST_NODE_TYPES . JSXMemberExpression ) {
@@ -423,7 +423,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
423
423
424
424
/**
425
425
* Applies the given TS modifiers to the given result object.
426
- * @param {ts.Node[] } modifiers original ts.Nodes from the node.modifiers array
426
+ * @param {ts.ModifiersArray } modifiers original ts.Nodes from the node.modifiers array
427
427
* @returns {void } (the current result object will be mutated)
428
428
*/
429
429
function applyModifiersToResult ( modifiers ?: ts . ModifiersArray ) : void {
0 commit comments