!288 Fix ArkTSLinter preview duplicate error problem

Merge pull request !288 from ironrain/work_0208_287_master_1
This commit is contained in:
openharmony_ci 2024-02-18 06:53:50 +00:00 committed by Gitee
commit a4618f3570
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
13 changed files with 114 additions and 0 deletions

View File

@ -192297,6 +192297,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_0.TSCCompiledProgram = TSCCompiledProgram;
@ -192326,6 +192329,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -192377,6 +192386,7 @@ var ts;
ArkTSLinter_1_0.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_0.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);
@ -196769,6 +196779,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_1.TSCCompiledProgram = TSCCompiledProgram;
@ -196798,6 +196811,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -196849,6 +196868,7 @@ var ts;
ArkTSLinter_1_1.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_1.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);

View File

@ -12955,6 +12955,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}
@ -13485,6 +13486,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}

View File

@ -192042,6 +192042,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_0.TSCCompiledProgram = TSCCompiledProgram;
@ -192071,6 +192074,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -192122,6 +192131,7 @@ var ts;
ArkTSLinter_1_0.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_0.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);
@ -196514,6 +196524,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_1.TSCCompiledProgram = TSCCompiledProgram;
@ -196543,6 +196556,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -196594,6 +196613,7 @@ var ts;
ArkTSLinter_1_1.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_1.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);

2
lib/typescript.d.ts vendored
View File

@ -9016,6 +9016,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}
@ -9546,6 +9547,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}

View File

@ -181136,6 +181136,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_0.TSCCompiledProgram = TSCCompiledProgram;
@ -181165,6 +181168,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -181216,6 +181225,7 @@ var ts;
ArkTSLinter_1_0.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_0.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);
@ -185608,6 +185618,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_1.TSCCompiledProgram = TSCCompiledProgram;
@ -185637,6 +185650,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -185688,6 +185707,7 @@ var ts;
ArkTSLinter_1_1.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_1.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);

View File

@ -9016,6 +9016,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}
@ -9546,6 +9547,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}

View File

@ -181136,6 +181136,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_0.TSCCompiledProgram = TSCCompiledProgram;
@ -181165,6 +181168,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -181216,6 +181225,7 @@ var ts;
ArkTSLinter_1_0.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_0.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);
@ -185608,6 +185618,9 @@ var ts;
TSCCompiledProgram.prototype.getStrictDiagnostics = function (fileName) {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
};
TSCCompiledProgram.prototype.doAllGetDiagnostics = function () {
this.diagnosticsExtractor.doAllGetDiagnostics();
};
return TSCCompiledProgram;
}());
ArkTSLinter_1_1.TSCCompiledProgram = TSCCompiledProgram;
@ -185637,6 +185650,12 @@ var ts;
return (hash && !nonStrictHashes.has(hash));
});
};
TypeScriptDiagnosticsExtractor.prototype.doAllGetDiagnostics = function () {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
};
return TypeScriptDiagnosticsExtractor;
}());
function getAllDiagnostics(program, fileName) {
@ -185688,6 +185707,7 @@ var ts;
ArkTSLinter_1_1.LinterConfig.initStatic();
var tscDiagnosticsLinter = new ArkTSLinter_1_1.TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
var strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
var srcFiles = [];
if (!!srcFile) {
srcFiles.push(srcFile);

View File

@ -41,6 +41,7 @@ export function runArkTSLinter(tsBuilderProgram: ArkTSProgram, reverseStrictBuil
const tscDiagnosticsLinter = new TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
const strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
let srcFiles: SourceFile[] = [];
if(!!srcFile) {

View File

@ -48,6 +48,10 @@ export class TSCCompiledProgram {
public getStrictDiagnostics(fileName: string): Diagnostic[] {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
}
public doAllGetDiagnostics() {
this.diagnosticsExtractor.doAllGetDiagnostics();
}
}
class TypeScriptDiagnosticsExtractor {
@ -76,6 +80,13 @@ class TypeScriptDiagnosticsExtractor {
return (hash && !nonStrictHashes.has(hash));
});
}
public doAllGetDiagnostics() {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
}
}
function getAllDiagnostics(program: BuilderProgram, fileName: string): Diagnostic[] {

View File

@ -41,6 +41,7 @@ export function runArkTSLinter(tsBuilderProgram: ArkTSProgram, reverseStrictBuil
const tscDiagnosticsLinter = new TSCCompiledProgram(tsBuilderProgram, reverseStrictBuilderProgram);
const strictProgram = tscDiagnosticsLinter.getStrictProgram();
tscDiagnosticsLinter.doAllGetDiagnostics();
let srcFiles: SourceFile[] = [];
if(!!srcFile) {

View File

@ -48,6 +48,10 @@ export class TSCCompiledProgram {
public getStrictDiagnostics(fileName: string): Diagnostic[] {
return this.diagnosticsExtractor.getStrictDiagnostics(fileName);
}
public doAllGetDiagnostics() {
this.diagnosticsExtractor.doAllGetDiagnostics();
}
}
class TypeScriptDiagnosticsExtractor {
@ -76,6 +80,13 @@ class TypeScriptDiagnosticsExtractor {
return (hash && !nonStrictHashes.has(hash));
});
}
public doAllGetDiagnostics() {
this.strictProgram.getSemanticDiagnostics();
this.strictProgram.getSyntacticDiagnostics();
this.nonStrictProgram.getSemanticDiagnostics();
this.nonStrictProgram.getSyntacticDiagnostics();
}
}
function getAllDiagnostics(program: BuilderProgram, fileName: string): Diagnostic[] {

View File

@ -12955,6 +12955,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}
@ -13485,6 +13486,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}

View File

@ -9016,6 +9016,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}
@ -9546,6 +9547,7 @@ declare namespace ts {
getStrictBuilderProgram(): BuilderProgram;
getNonStrictBuilderProgram(): BuilderProgram;
getStrictDiagnostics(fileName: string): Diagnostic[];
doAllGetDiagnostics(): void;
}
}
}