Update LKG

This commit is contained in:
Mohamed Hegazy
2016-02-25 14:48:08 -08:00
parent 602127d95c
commit acd9bef097
4 changed files with 64 additions and 34 deletions

View File

@@ -24942,7 +24942,7 @@ var ts;
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile.fileName);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
var declarationFilePath = _a.declarationFilePath;
emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit);
@@ -32972,7 +32972,13 @@ var ts;
return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken);
}
function getDeclarationDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
var options = program.getCompilerOptions();
if (!sourceFile || options.out || options.outFile) {
return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
else {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
}
}
function getSyntacticDiagnosticsForFile(sourceFile, cancellationToken) {
return sourceFile.parseDiagnostics;
@@ -33153,15 +33159,16 @@ var ts;
}
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
if (!ts.isDeclarationFile(sourceFile)) {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
var writeFile_1 = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile_1), resolver, sourceFile);
}
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
var writeFile = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile);
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
var allDiagnostics = [];
ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());

View File

@@ -25510,7 +25510,7 @@ var ts;
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile.fileName);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
var declarationFilePath = _a.declarationFilePath;
emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit);
@@ -33540,7 +33540,13 @@ var ts;
return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken);
}
function getDeclarationDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
var options = program.getCompilerOptions();
if (!sourceFile || options.out || options.outFile) {
return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
else {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
}
}
function getSyntacticDiagnosticsForFile(sourceFile, cancellationToken) {
return sourceFile.parseDiagnostics;
@@ -33721,15 +33727,16 @@ var ts;
}
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
if (!ts.isDeclarationFile(sourceFile)) {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
var writeFile_1 = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile_1), resolver, sourceFile);
}
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
var writeFile = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile);
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
var allDiagnostics = [];
ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());

View File

@@ -30548,7 +30548,7 @@ var ts;
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile.fileName);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
var declarationFilePath = _a.declarationFilePath;
emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit);
@@ -39825,7 +39825,14 @@ var ts;
return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken);
}
function getDeclarationDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
var options = program.getCompilerOptions();
// collect diagnostics from the program only once if either no source file was specified or out/outFile is set (bundled emit)
if (!sourceFile || options.out || options.outFile) {
return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
else {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
}
}
function getSyntacticDiagnosticsForFile(sourceFile, cancellationToken) {
return sourceFile.parseDiagnostics;
@@ -40019,16 +40026,17 @@ var ts;
}
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
if (!ts.isDeclarationFile(sourceFile)) {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
// Don't actually write any files since we're just getting diagnostics.
var writeFile_1 = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile_1), resolver, sourceFile);
}
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
// Don't actually write any files since we're just getting diagnostics.
var writeFile = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile);
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
var allDiagnostics = [];
ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());

View File

@@ -30548,7 +30548,7 @@ var ts;
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile.fileName);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
var declarationFilePath = _a.declarationFilePath;
emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit);
@@ -39825,7 +39825,14 @@ var ts;
return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken);
}
function getDeclarationDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
var options = program.getCompilerOptions();
// collect diagnostics from the program only once if either no source file was specified or out/outFile is set (bundled emit)
if (!sourceFile || options.out || options.outFile) {
return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
else {
return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
}
}
function getSyntacticDiagnosticsForFile(sourceFile, cancellationToken) {
return sourceFile.parseDiagnostics;
@@ -40019,16 +40026,17 @@ var ts;
}
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
if (!ts.isDeclarationFile(sourceFile)) {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
// Don't actually write any files since we're just getting diagnostics.
var writeFile_1 = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile_1), resolver, sourceFile);
}
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
// Don't actually write any files since we're just getting diagnostics.
var writeFile = function () { };
return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile);
});
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
var allDiagnostics = [];
ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());