UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

23 lines (21 loc) 614 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); /** * Gets if the node is a string node. * @param node - Node. */ function isStringNode(node) { switch (node.getKind()) { case ts.SyntaxKind.StringLiteral: case ts.SyntaxKind.FirstTemplateToken: case ts.SyntaxKind.TemplateHead: case ts.SyntaxKind.TemplateMiddle: case ts.SyntaxKind.LastTemplateToken: return true; default: return false; } } exports.isStringNode = isStringNode; //# sourceMappingURL=isStringNode.js.map