UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

45 lines (43 loc) 2.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); // they need to be individually imported instead of using a namespace import so that this works with the `declaration: true` compiler argument const compiler_1 = require("./../compiler"); // when changing this, make sure to run `npm run code-generate`. // that will automatically update all other parts of the application that need to be updated when this changes. exports.nodeToWrapperMappings = { [ts.SyntaxKind.SourceFile]: compiler_1.SourceFile, [ts.SyntaxKind.ArrayLiteralExpression]: compiler_1.ArrayLiteralExpression, [ts.SyntaxKind.CallExpression]: compiler_1.CallExpression, [ts.SyntaxKind.ClassDeclaration]: compiler_1.ClassDeclaration, [ts.SyntaxKind.Constructor]: compiler_1.ConstructorDeclaration, [ts.SyntaxKind.ConstructSignature]: compiler_1.ConstructSignatureDeclaration, [ts.SyntaxKind.Decorator]: compiler_1.Decorator, [ts.SyntaxKind.EnumDeclaration]: compiler_1.EnumDeclaration, [ts.SyntaxKind.EnumMember]: compiler_1.EnumMember, [ts.SyntaxKind.ExportDeclaration]: compiler_1.ExportDeclaration, [ts.SyntaxKind.ExportSpecifier]: compiler_1.ExportSpecifier, [ts.SyntaxKind.ExpressionWithTypeArguments]: compiler_1.ExpressionWithTypeArguments, [ts.SyntaxKind.FunctionDeclaration]: compiler_1.FunctionDeclaration, [ts.SyntaxKind.GetAccessor]: compiler_1.GetAccessorDeclaration, [ts.SyntaxKind.HeritageClause]: compiler_1.HeritageClause, [ts.SyntaxKind.Identifier]: compiler_1.Identifier, [ts.SyntaxKind.ImportDeclaration]: compiler_1.ImportDeclaration, [ts.SyntaxKind.ImportSpecifier]: compiler_1.ImportSpecifier, [ts.SyntaxKind.InterfaceDeclaration]: compiler_1.InterfaceDeclaration, [ts.SyntaxKind.MethodDeclaration]: compiler_1.MethodDeclaration, [ts.SyntaxKind.MethodSignature]: compiler_1.MethodSignature, [ts.SyntaxKind.ModuleDeclaration]: compiler_1.NamespaceDeclaration, [ts.SyntaxKind.NumericLiteral]: compiler_1.Expression, [ts.SyntaxKind.Parameter]: compiler_1.ParameterDeclaration, [ts.SyntaxKind.PropertyDeclaration]: compiler_1.PropertyDeclaration, [ts.SyntaxKind.PropertySignature]: compiler_1.PropertySignature, [ts.SyntaxKind.SetAccessor]: compiler_1.SetAccessorDeclaration, [ts.SyntaxKind.TypeAliasDeclaration]: compiler_1.TypeAliasDeclaration, [ts.SyntaxKind.TypeParameter]: compiler_1.TypeParameterDeclaration, [ts.SyntaxKind.VariableDeclaration]: compiler_1.VariableDeclaration, [ts.SyntaxKind.VariableDeclarationList]: compiler_1.VariableDeclarationList, [ts.SyntaxKind.VariableStatement]: compiler_1.VariableStatement, [ts.SyntaxKind.JSDocComment]: compiler_1.JSDoc }; //# sourceMappingURL=nodeToWrapperMappings.js.map