Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bf8231

Browse files
pablobirukovbradzacher
authored andcommitted
fix(typescript-estree): ImportDeclaration.specifier to Literal (typescript-eslint#974)
1 parent aeea4cd commit 2bf8231

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/eslint-plugin/src/rules/triple-slash-reference.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ export default util.createRule<Options, MessageIds>({
7373
return {
7474
ImportDeclaration(node): void {
7575
if (programNode) {
76-
const source = node.source as TSESTree.Literal;
77-
hasMatchingReference(source);
76+
hasMatchingReference(node.source);
7877
}
7978
},
8079
TSImportEqualsDeclaration(node): void {

packages/typescript-estree/src/ts-estree/ts-estree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ export interface Import extends BaseNode {
732732

733733
export interface ImportDeclaration extends BaseNode {
734734
type: AST_NODE_TYPES.ImportDeclaration;
735-
source: Expression;
735+
source: Literal;
736736
specifiers: ImportClause[];
737737
}
738738

0 commit comments

Comments
 (0)