!792 master分支解决sdk中使用import type编译报错问题

Merge pull request !792 from fupengfei/master
This commit is contained in:
openharmony_ci 2023-03-09 14:06:26 +00:00 committed by Gitee
commit b17b8662e5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -68,6 +68,9 @@ export function getImportDeclaration(node: Node, sourceFile: SourceFile): Import
const importClause = importNode.importClause;
if (importClause !== undefined) {
importElements = sourceFile.text.substring(importClause.pos, importClause.end).trimStart().trimEnd();
if (importElements.startsWith('type ')) {
importElements = importElements.replace('type ', '');
}
}
return {