UNPKG

2.03 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var ts = require("typescript");
4function isJsxAttribute(node) {
5 return node && node.kind === ts.SyntaxKind.JsxAttribute;
6}
7exports.isJsxAttribute = isJsxAttribute;
8function isJsxSpreadAttribute(node) {
9 return node && node.kind === ts.SyntaxKind.JsxSpreadAttribute;
10}
11exports.isJsxSpreadAttribute = isJsxSpreadAttribute;
12function isJsxExpression(node) {
13 return node && node.kind === ts.SyntaxKind.JsxExpression;
14}
15exports.isJsxExpression = isJsxExpression;
16function isNumericLiteral(node) {
17 return node && node.kind === ts.SyntaxKind.NumericLiteral;
18}
19exports.isNumericLiteral = isNumericLiteral;
20function isStringLiteral(node) {
21 return node && node.kind === ts.SyntaxKind.StringLiteral;
22}
23exports.isStringLiteral = isStringLiteral;
24function isJsxElement(node) {
25 return node && node.kind === ts.SyntaxKind.JsxElement;
26}
27exports.isJsxElement = isJsxElement;
28function isJsxSelfClosingElement(node) {
29 return node && node.kind === ts.SyntaxKind.JsxSelfClosingElement;
30}
31exports.isJsxSelfClosingElement = isJsxSelfClosingElement;
32function isJsxOpeningElement(node) {
33 return node && node.kind === ts.SyntaxKind.JsxOpeningElement;
34}
35exports.isJsxOpeningElement = isJsxOpeningElement;
36function isTrueKeyword(node) {
37 return node && node.kind === ts.SyntaxKind.TrueKeyword;
38}
39exports.isTrueKeyword = isTrueKeyword;
40function isFalseKeyword(node) {
41 return node && node.kind === ts.SyntaxKind.FalseKeyword;
42}
43exports.isFalseKeyword = isFalseKeyword;
44function isNullKeyword(node) {
45 return node && node.kind === ts.SyntaxKind.NullKeyword;
46}
47exports.isNullKeyword = isNullKeyword;
48function isObject(value) {
49 return value !== undefined && typeof value === 'object' && !Array.isArray(value);
50}
51exports.isObject = isObject;
52function isNamed(node) {
53 return 'name' in node && node.name !== undefined;
54}
55exports.isNamed = isNamed;
56//# sourceMappingURL=TypeGuard.js.map
\No newline at end of file