11import ts from "typescript" ;
2- import { SubNodeParser } from "../SubNodeParser.js" ;
3- import { BaseType } from "../Type/BaseType.js" ;
2+ import type { SubNodeParser } from "../SubNodeParser.js" ;
3+ import type { BaseType } from "../Type/BaseType.js" ;
44import { FunctionType } from "../Type/FunctionType.js" ;
5- import { FunctionOptions } from "../Config.js" ;
5+ import type { FunctionOptions } from "../Config.js" ;
66import { NeverType } from "../Type/NeverType.js" ;
77import { DefinitionType } from "../Type/DefinitionType.js" ;
8- import { Context , NodeParser } from "../NodeParser.js" ;
8+ import type { Context , NodeParser } from "../NodeParser.js" ;
99import { ObjectProperty , ObjectType } from "../Type/ObjectType.js" ;
1010import { getKey } from "../Utils/nodeKey.js" ;
1111
@@ -15,14 +15,11 @@ export class FunctionNodeParser implements SubNodeParser {
1515 protected functions : FunctionOptions ,
1616 ) { }
1717
18- public supportsNode ( node : ts . TypeNode ) : boolean {
18+ public supportsNode ( node : ts . Node ) : boolean {
1919 return (
2020 node . kind === ts . SyntaxKind . FunctionType ||
21- // @ts -expect-error internals type bug
2221 node . kind === ts . SyntaxKind . FunctionExpression ||
23- // @ts -expect-error internals type bug
2422 node . kind === ts . SyntaxKind . ArrowFunction ||
25- // @ts -expect-error internals type bug
2623 node . kind === ts . SyntaxKind . FunctionDeclaration
2724 ) ;
2825 }
0 commit comments