mirror of
https://gitee.com/openharmony/developtools_ace_ets2bundle
synced 2025-03-07 01:50:34 +00:00
!3366 change the type used in ts from global
Merge pull request !3366 from 王曹宇/bugfix_use_type_in_ts
This commit is contained in:
commit
3f2b496707
@ -230,14 +230,20 @@ export function checkTypeReference(node: ts.TypeReferenceNode, transformLog: Fil
|
||||
const sourceBaseName: string = path.basename(sourceFile.fileName);
|
||||
if (isArkuiDependence(sourceFile.fileName) &&
|
||||
sourceBaseName !== 'common_ts_ets_api.d.ts' &&
|
||||
sourceBaseName !== 'global.d.ts' ||
|
||||
GLOBAL_DECLARE_WHITE_LIST.has(currentTypeName) &&
|
||||
ohosSystemModulePaths.includes(sourceFile.fileName.replace(/\//g, '\\'))) {
|
||||
sourceBaseName !== 'global.d.ts'
|
||||
) {
|
||||
transformLog.errors.push({
|
||||
type: LogType.ERROR,
|
||||
message: `Cannot find name '${currentTypeName}'.`,
|
||||
pos: node.getStart()
|
||||
});
|
||||
} else if (GLOBAL_DECLARE_WHITE_LIST.has(currentTypeName) &&
|
||||
ohosSystemModulePaths.includes(sourceFile.fileName.replace(/\//g, '\\'))) {
|
||||
transformLog.errors.push({
|
||||
type: LogType.WARN,
|
||||
message: `Cannot find name '${currentTypeName}'.`,
|
||||
pos: node.getStart()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user