import { ts, type tsc } from './typescript'; /** * A lot of the extra information here only exists because TypeScript doesn't * export a union containing all the different node types, so you can't narrow * a node's type by its kind. Narrowing based on kind is very useful for plugins * since you can define a property using a kind name and the type of the 'node' * argument can be inferred instead of every plugin needing to cast it manually. * If you find yourself needing to parse any node kinds that aren't on this list, * please add them here. * * See: https://github.com/microsoft/TypeScript/issues/13634 */ export declare const SupportedKinds: { 265: { name: "TypeAliasDeclaration"; node: ts.TypeAliasDeclaration; }; 183: { name: "TypeReference"; node: ts.TypeReferenceNode; }; 187: { name: "TypeLiteral"; node: ts.TypeLiteralNode; }; 171: { name: "PropertySignature"; node: ts.PropertySignature; }; 189: { name: "TupleType"; node: ts.TupleTypeNode; }; 218: { name: "FunctionExpression"; node: ts.FunctionExpression; }; 262: { name: "FunctionDeclaration"; node: ts.FunctionDeclaration; }; 209: { name: "ArrayLiteralExpression"; node: ts.ArrayLiteralExpression; }; 213: { name: "CallExpression"; node: ts.CallExpression; }; 11: { name: "StringLiteral"; node: ts.StringLiteral; }; 9: { name: "NumericLiteral"; node: ts.NumericLiteral; }; 112: { name: "TrueKeyword"; node: ts.TrueLiteral; }; 97: { name: "FalseKeyword"; node: ts.FalseLiteral; }; 80: { name: "Identifier"; node: ts.Identifier; }; 307: { name: "SourceFile"; node: ts.SourceFile; }; 260: { name: "VariableDeclaration"; node: ts.VariableDeclaration; }; 263: { name: "ClassDeclaration"; node: ts.ClassDeclaration; }; 278: { name: "ExportDeclaration"; node: ts.ExportDeclaration; }; 210: { name: "ObjectLiteralExpression"; node: ts.ObjectLiteralExpression; }; 234: { name: "AsExpression"; node: ts.AsExpression; }; 167: { name: "ComputedPropertyName"; node: ts.ComputedPropertyName; }; 303: { name: "PropertyAssignment"; node: ts.PropertyAssignment; }; 304: { name: "ShorthandPropertyAssignment"; node: ts.ShorthandPropertyAssignment; }; 211: { name: "PropertyAccessExpression"; node: ts.PropertyAccessExpression; }; 15: { name: "NoSubstitutionTemplateLiteral"; node: ts.NoSubstitutionTemplateLiteral; }; 244: { name: "ExpressionStatement"; node: ts.ExpressionStatement; }; 215: { name: "TaggedTemplateExpression"; node: ts.TaggedTemplateExpression; }; 277: { name: "ExportAssignment"; node: ts.ExportAssignment; }; 212: { name: "ElementAccessExpression"; node: ts.ElementAccessExpression; }; 228: { name: "TemplateExpression"; node: ts.TemplateExpression; }; 273: { name: "ImportClause"; node: ts.ImportClause; }; 276: { name: "ImportSpecifier"; node: ts.ImportSpecifier; }; 272: { name: "ImportDeclaration"; node: ts.ImportDeclaration; }; 275: { name: "NamedImports"; node: ts.NamedImports; }; 243: { name: "VariableStatement"; node: ts.VariableStatement; }; 261: { name: "VariableDeclarationList"; node: ts.VariableDeclarationList; }; 40: { name: "PlusToken"; node: ts.Node; }; 1: { name: "EndOfFileToken"; node: ts.Node; }; 95: { name: "ExportKeyword"; node: ts.Node; }; 133: { name: "AnyKeyword"; node: ts.Node>; }; 267: { name: "ModuleDeclaration"; node: ts.ModuleDeclaration; }; 268: { name: "ModuleBlock"; node: ts.ModuleBlock; }; 241: { name: "Block"; node: ts.Block; }; 169: { name: "Parameter"; node: ts.ParameterDeclaration; }; 39: { name: "EqualsGreaterThanToken"; node: ts.Node; }; 219: { name: "ArrowFunction"; node: ts.ArrowFunction; }; 16: { name: "TemplateHead"; node: ts.TemplateHead; }; 17: { name: "TemplateMiddle"; node: ts.TemplateMiddle; }; 239: { name: "TemplateSpan"; node: ts.TemplateSpan; }; 18: { name: "TemplateTail"; node: ts.TemplateTail; }; 224: { name: "PrefixUnaryExpression"; node: ts.PrefixUnaryExpression; }; }; export type SupportedKind = keyof typeof SupportedKinds; export type SupportedKindName = (typeof SupportedKinds)[SupportedKind]['name']; export type SupportedNode = (typeof SupportedKinds)[SupportedKind]['node']; export type SupportedNodeByKind = (typeof SupportedKinds)[K]['node']; export type SupportedNodeByKindName = Extract<(typeof SupportedKinds)[SupportedKind], { name: K; }>['node']; export declare function isSupportedKind(kind: ts.SyntaxKind): kind is SupportedKind; export declare function isSupportedNode(node: ts.Node): node is SupportedNode; export declare function getKind(node: SupportedNode): SupportedKind; export declare function getKindName(nodeOrKind: SupportedNode | SupportedKind): SupportedKindName;