Add import type and export type support to TypeScript (#11171)
* Add support for type only imports in TS (#11053) * Implement "export type {}" (#11122) * Add "exportKind: type" when needed with TS (#11157) * Add `onlyRemoveTypeImports` option to `transform-typescript` (#11173) * Add onlyRemoveTypeImports to preset-typescript (#11179) Co-authored-by: Brian Ng <bng412@gmail.com> Co-authored-by: Raja Sekar <rajasekarm.dev@gmail.com> Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> Co-authored-by: Kai Cataldo <kai@kaicataldo.com> Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com> Co-authored-by: Henry Zhu <smiley.we@gmail.com> Co-authored-by: Siddhant N Trivedi <sidntrivedi012@gmail.com>
This commit is contained in:
@@ -382,7 +382,8 @@ defineType("ImportDeclaration", {
|
||||
validate: assertNodeType("StringLiteral"),
|
||||
},
|
||||
importKind: {
|
||||
// Handle Flowtype's extension "import {typeof foo} from"
|
||||
// Handle TypeScript/Flowtype's extension "import type foo from"
|
||||
// TypeScript doesn't support typeof
|
||||
validate: assertOneOf("type", "typeof", "value"),
|
||||
optional: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user