Skip to content

Commit

Permalink
fix: add import type handler
Browse files Browse the repository at this point in the history
  • Loading branch information
plantain-00 committed Oct 30, 2018
1 parent 98ea1a9 commit b2a7a0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/result.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ src/index.ts:23:106: debug
src/index.ts:38:4: error
src/index.ts:39:7: error
src/index.ts:42:17: error
3064 / 3077 100%
3086 / 3099 100%
type-coverage success.
6 changes: 6 additions & 0 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,12 @@ export async function lint(project: string, detail: boolean, debug: boolean) {
const literalTypeNode = node as ts.LiteralTypeNode
handleNode(literalTypeNode.literal, file, sourceFile)
break
case ts.SyntaxKind.ImportType:
const importTypeNode = node as ts.ImportTypeNode
handleNode(importTypeNode.qualifier, file, sourceFile)
handleNode(importTypeNode.argument, file, sourceFile)
handleNodes(importTypeNode.typeArguments, file, sourceFile)
break
case ts.SyntaxKind.ObjectBindingPattern:
const objectBindingPattern = node as ts.ObjectBindingPattern
handleNodes(objectBindingPattern.elements, file, sourceFile)
Expand Down

0 comments on commit b2a7a0b

Please sign in to comment.