Checks if the node is a genuine import declation. In particular the re-parsed KindJSImportDeclaration is explicitly excluded because the callers of this function are typically not prepared to handle it properly. For more permissive check, use IsImportNode.
(node *Node)
| 1870 | // is explicitly excluded because the callers of this function are typically not prepared to handle it properly. |
| 1871 | // For more permissive check, use IsImportNode. |
| 1872 | func IsAnyImportSyntax(node *Node) bool { |
| 1873 | return NodeKindIs(node, KindImportDeclaration, KindImportEqualsDeclaration) |
| 1874 | } |
| 1875 | |
| 1876 | func IsJsonSourceFile(file *SourceFile) bool { |
| 1877 | return file.ScriptKind == core.ScriptKindJSON |
no test coverage detected