@babel/generator: Add emit and builder for TSImportType (#9309)

This commit is contained in:
Henry Zhu
2019-01-10 13:57:00 -05:00
committed by GitHub
parent 2cc0376756
commit 4c2f8d9337
4 changed files with 32 additions and 1 deletions

View File

@@ -476,6 +476,21 @@ export function TSModuleBlock(node) {
this.tsPrintBraced(node.body, node);
}
export function TSImportType(node) {
const { argument, qualifier, typeParameters } = node;
this.word("import");
this.token("(");
this.print(argument, node);
this.token(")");
if (qualifier) {
this.token(".");
this.print(qualifier, node);
}
if (typeParameters) {
this.print(typeParameters, node);
}
}
export function TSImportEqualsDeclaration(node) {
const { isExport, id, moduleReference } = node;
if (isExport) {