Comparing version 3.1.0 to 3.2.0
@@ -0,1 +1,7 @@ | ||
# 3.2.0 | ||
**Features:** | ||
* added utility `findImportLikeNodes` that works similar to `findImports` but returns the import statement or expression instead of the module specifier and doesn't filter non-string module specifiers | ||
# 3.1.0 | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "tsutils", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "utilities for working with typescript's AST", | ||
@@ -34,4 +34,4 @@ "scripts": { | ||
"devDependencies": { | ||
"@fimbul/valtyr": "^0.12.0", | ||
"@fimbul/wotan": "^0.12.0", | ||
"@fimbul/valtyr": "^0.15.0", | ||
"@fimbul/wotan": "^0.15.0", | ||
"@types/chai": "^4.0.10", | ||
@@ -51,3 +51,3 @@ "@types/mocha": "^5.0.0", | ||
"peerDependencies": { | ||
"typescript": ">=2.8.0 || >= 3.2.0-dev" | ||
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev" | ||
}, | ||
@@ -54,0 +54,0 @@ "dependencies": { |
@@ -133,3 +133,3 @@ import * as ts from 'typescript'; | ||
export declare function isTemplateLiteral(node: ts.Node): node is ts.TemplateLiteral; | ||
export declare function isTextualLiteral(node: ts.Node): node is ts.LiteralExpression; | ||
export declare function isTextualLiteral(node: ts.Node): node is ts.StringLiteral | ts.NoSubstitutionTemplateLiteral; | ||
export declare function isThrowStatement(node: ts.Node): node is ts.ThrowStatement; | ||
@@ -136,0 +136,0 @@ export declare function isTryStatement(node: ts.Node): node is ts.TryStatement; |
@@ -106,3 +106,14 @@ import * as ts from 'typescript'; | ||
} | ||
export declare function findImports(sourceFile: ts.SourceFile, kinds: ImportKind): ts.LiteralExpression[]; | ||
export declare function findImports(sourceFile: ts.SourceFile, kinds: ImportKind): (ts.StringLiteral | ts.NoSubstitutionTemplateLiteral)[]; | ||
export declare type ImportLike = ts.ImportDeclaration | (ts.ImportEqualsDeclaration & { | ||
moduleReference: ts.ExternalModuleReference; | ||
}) | (ts.ExportDeclaration & { | ||
moduleSpecifier: {}; | ||
}) | (ts.CallExpression & { | ||
expression: ts.Token<ts.SyntaxKind.ImportKeyword> | (ts.Identifier & { | ||
text: 'require'; | ||
}); | ||
arguments: [ts.Expression]; | ||
}) | ts.ImportTypeNode; | ||
export declare function findImportLikeNodes(sourceFile: ts.SourceFile, kinds: ImportKind): ImportLike[]; | ||
export declare function isStatementInAmbientContext(node: ts.Statement): boolean; | ||
@@ -109,0 +120,0 @@ export declare function isAmbientModuleBlock(node: ts.Node): node is ts.ModuleBlock; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
412696
3351