mirror of
https://gitee.com/openharmony/third_party_typescript
synced 2024-11-22 22:40:30 +00:00
resolve the differences from the blue and yellow zones
Issue: https://gitee.com/openharmony/third_party_typescript/issues/IAEPHM Signed-off-by: liyancheng2 <liyancheng2@huawei.com> Change-Id: Ib61d29bb1204fbb542d73a75d63cda86517fb166
This commit is contained in:
parent
4428af7cc3
commit
7774bcdb9a
@ -24,7 +24,7 @@ def run_cmd(cmd, execution_path=None):
|
||||
stdin=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
cwd=execution_path)
|
||||
stdout, stderr = proc.communicate()
|
||||
stdout, stderr = proc.communicate(timeout=120)
|
||||
if proc.returncode != 0:
|
||||
print(stdout.decode(), stderr.decode())
|
||||
raise Exception(stderr.decode())
|
||||
|
@ -98136,7 +98136,7 @@ var ts;
|
||||
function emitSourceFile(node) {
|
||||
writeLine();
|
||||
if (node.writeTsHarComments) {
|
||||
writeComment("// @keepTs\n// @ts-nocheck\n");
|
||||
writeComment('// @keepTs\n// @ts-nocheck\n');
|
||||
}
|
||||
var statements = node.statements;
|
||||
var shouldEmitDetachedComment = statements.length === 0 ||
|
||||
|
@ -118504,7 +118504,7 @@ var ts;
|
||||
writeLine();
|
||||
// @ts-ignore
|
||||
if (node.writeTsHarComments) {
|
||||
writeComment("// @keepTs\n// @ts-nocheck\n");
|
||||
writeComment('// @keepTs\n// @ts-nocheck\n');
|
||||
}
|
||||
var statements = node.statements;
|
||||
// Emit detached comment if there are no prologue directives or if the first node is synthesized.
|
||||
|
@ -118503,7 +118503,7 @@ var ts;
|
||||
writeLine();
|
||||
// @ts-ignore
|
||||
if (node.writeTsHarComments) {
|
||||
writeComment("// @keepTs\n// @ts-nocheck\n");
|
||||
writeComment('// @keepTs\n// @ts-nocheck\n');
|
||||
}
|
||||
var statements = node.statements;
|
||||
// Emit detached comment if there are no prologue directives or if the first node is synthesized.
|
||||
|
@ -118494,7 +118494,7 @@ var ts;
|
||||
writeLine();
|
||||
// @ts-ignore
|
||||
if (node.writeTsHarComments) {
|
||||
writeComment("// @keepTs\n// @ts-nocheck\n");
|
||||
writeComment('// @keepTs\n// @ts-nocheck\n');
|
||||
}
|
||||
var statements = node.statements;
|
||||
// Emit detached comment if there are no prologue directives or if the first node is synthesized.
|
||||
|
@ -118494,7 +118494,7 @@ var ts;
|
||||
writeLine();
|
||||
// @ts-ignore
|
||||
if (node.writeTsHarComments) {
|
||||
writeComment("// @keepTs\n// @ts-nocheck\n");
|
||||
writeComment('// @keepTs\n// @ts-nocheck\n');
|
||||
}
|
||||
var statements = node.statements;
|
||||
// Emit detached comment if there are no prologue directives or if the first node is synthesized.
|
||||
|
@ -118484,7 +118484,7 @@ var ts;
|
||||
writeLine();
|
||||
// @ts-ignore
|
||||
if (node.writeTsHarComments) {
|
||||
writeComment("// @keepTs\n// @ts-nocheck\n");
|
||||
writeComment('// @keepTs\n// @ts-nocheck\n');
|
||||
}
|
||||
var statements = node.statements;
|
||||
// Emit detached comment if there are no prologue directives or if the first node is synthesized.
|
||||
|
@ -30457,7 +30457,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (isConstEnumObjectType(objectType)) {
|
||||
checkConstEnumRelate(node, objectType.symbol)
|
||||
checkConstEnumRelate(node, objectType.symbol);
|
||||
}
|
||||
|
||||
const effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
|
||||
|
@ -4031,7 +4031,7 @@ namespace ts {
|
||||
writeLine();
|
||||
// @ts-ignore
|
||||
if (node.writeTsHarComments) {
|
||||
writeComment("// @keepTs\n// @ts-nocheck\n");
|
||||
writeComment('// @keepTs\n// @ts-nocheck\n');
|
||||
}
|
||||
const statements = node.statements;
|
||||
// Emit detached comment if there are no prologue directives or if the first node is synthesized.
|
||||
|
@ -2218,14 +2218,17 @@ namespace ts {
|
||||
);
|
||||
}
|
||||
|
||||
function getBindAndCheckDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined, isForLinter: boolean = false): readonly Diagnostic[] {
|
||||
function getBindAndCheckDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined,
|
||||
isForLinter: boolean = false): readonly Diagnostic[] {
|
||||
if (!isForLinter) {
|
||||
return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFile, getBindAndCheckDiagnosticsForFileNoCache);
|
||||
}
|
||||
return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFileForLinter, getBindAndCheckDiagnosticsForFileNoCache, true);
|
||||
return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFileForLinter,
|
||||
getBindAndCheckDiagnosticsForFileNoCache, true);
|
||||
}
|
||||
|
||||
function getBindAndCheckDiagnosticsForFileNoCache(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined, isForLinter: boolean = false): readonly Diagnostic[] {
|
||||
function getBindAndCheckDiagnosticsForFileNoCache(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined,
|
||||
isForLinter: boolean = false): readonly Diagnostic[] {
|
||||
return runWithCancellationToken(() => {
|
||||
// Only check and block .d.ts import .ets behavior when it is called by "ets-loader" and scanned.
|
||||
const filterFlag = !!options.needDoArkTsLinter;
|
||||
|
Loading…
Reference in New Issue
Block a user