@babel/generator: Add emit and builder for TSImportType (#9309)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user