-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Type-only import specifiers #45998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type-only import specifiers #45998
Changes from 1 commit
dc73483
ad27364
0ba00b9
eb63b02
9b31bd1
02d4ff9
ac9b14b
577868d
c41f8ee
d34544c
76da8c7
487f585
b6ea3ac
9a1765e
9e1878d
f7248e1
06063f2
4ba367b
75a2909
b55acde
414f38b
3768d0a
39e72d8
9033c72
adcb331
d64c923
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7362,10 +7362,10 @@ namespace ts { | |
| let isTypeOnly = false; | ||
| if (name.escapedText === "type") { | ||
| // If the first token of an import specifier is 'type', there are a lot of possibilities, | ||
| // especially we see 'as' afterwards: | ||
| // especially if we see 'as' afterwards: | ||
| // | ||
| // import { type } from "mod"; - isTypeOnly: false, name: type | ||
| // import { type as } from "mod"; - isTypeOnly: true, name: type | ||
| // import { type as } from "mod"; - isTypeOnly: true, name: as | ||
| // import { type as as } from "mod"; - isTypeOnly: false, name: as, propertyName: type | ||
| // import { type as as as } from "mod"; - isTypeOnly: true, name: as, propertyName: as | ||
|
Comment on lines
+7415
to
+7418
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ooof, this is awful.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have completion list tests for these?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have tests for |
||
| if (token() === SyntaxKind.AsKeyword) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.