1 | import * as ts from 'typescript';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export function isJsxAttribute(node: ts.Node): node is ts.JsxAttribute {
|
10 | return node && node.kind === ts.SyntaxKind.JsxAttribute;
|
11 | }
|
12 |
|
13 | export function isJsxSpreadAttribute(node: ts.Node): node is ts.JsxSpreadAttribute {
|
14 | return node && node.kind === ts.SyntaxKind.JsxSpreadAttribute;
|
15 | }
|
16 |
|
17 | export function isJsxExpression(node: ts.Node): node is ts.JsxExpression {
|
18 | return node && node.kind === ts.SyntaxKind.JsxExpression;
|
19 | }
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export function isNumericLiteral(node: ts.Node): node is ts.LiteralExpression {
|
25 | return node && node.kind === ts.SyntaxKind.NumericLiteral;
|
26 | }
|
27 |
|
28 | export function isStringLiteral(node: ts.Node): node is ts.StringLiteral {
|
29 | return node && node.kind === ts.SyntaxKind.StringLiteral;
|
30 | }
|
31 |
|
32 | export function isJsxElement(node: ts.Node): node is ts.JsxElement {
|
33 | return node && node.kind === ts.SyntaxKind.JsxElement;
|
34 | }
|
35 |
|
36 | export function isJsxSelfClosingElement(node: ts.Node): node is ts.JsxSelfClosingElement {
|
37 | return node && node.kind === ts.SyntaxKind.JsxSelfClosingElement;
|
38 | }
|
39 |
|
40 | export function isJsxOpeningElement(node: ts.Node): node is ts.JsxOpeningElement {
|
41 | return node && node.kind === ts.SyntaxKind.JsxOpeningElement;
|
42 | }
|
43 |
|
44 | export function isTrueKeyword(node: ts.Node): node is ts.LiteralExpression {
|
45 | return node && node.kind === ts.SyntaxKind.TrueKeyword;
|
46 | }
|
47 | export function isFalseKeyword(node: ts.Node): node is ts.LiteralExpression {
|
48 | return node && node.kind === ts.SyntaxKind.FalseKeyword;
|
49 | }
|
50 | export function isNullKeyword(node: ts.Node): node is ts.LiteralExpression {
|
51 | return node && node.kind === ts.SyntaxKind.NullKeyword;
|
52 | }
|