Update LKG.

This commit is contained in:
Daniel Rosenwasser
2018-12-06 17:53:27 -08:00
parent f4a68f9e27
commit 0ed5432733
6 changed files with 58 additions and 106 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
var ts;
(function (ts) {
ts.versionMajorMinor = "3.2";
ts.version = ts.versionMajorMinor + ".1";
ts.version = ts.versionMajorMinor + ".2";
})(ts || (ts = {}));
(function (ts) {
ts.emptyArray = [];
+14 -26
View File
@@ -88,7 +88,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".1";
ts.version = ts.versionMajorMinor + ".2";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
@@ -96713,14 +96713,11 @@ var ts;
// If already using commonjs, don't introduce ES6.
if (sourceFile.commonJsModuleIndicator)
return false;
// For JS, stay on the safe side.
if (isUncheckedFile)
return false;
// If some file is using ES6 modules, assume that it's OK to add more.
if (ts.programContainsEs6Modules(program))
return true;
// If module transpilation is enabled or we're targeting es6 or above, or not emitting, OK.
return ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions());
if (ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions()))
return true;
// If some file is using ES6 modules, assume that it's OK to add more.
return ts.programContainsEs6Modules(program);
}
function isSnippetScope(scopeNode) {
switch (scopeNode.kind) {
@@ -97519,7 +97516,7 @@ var ts;
}
}
function isFunctionLikeBodyKeyword(kind) {
return kind === 121 /* AsyncKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
return kind === 121 /* AsyncKeyword */ || kind === 122 /* AwaitKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
}
function keywordForNode(node) {
return ts.isIdentifier(node) ? node.originalKeywordKind || 0 /* Unknown */ : node.kind;
@@ -106816,10 +106813,7 @@ var ts;
* Trimming will be done for lines after the previous range
*/
function trimTrailingWhitespacesForRemainingRange() {
if (!previousRange) {
return;
}
var startPosition = previousRange.end;
var startPosition = previousRange ? previousRange.end : originalRange.pos;
var startLine = sourceFile.getLineAndCharacterOfPosition(startPosition).line;
var endLine = sourceFile.getLineAndCharacterOfPosition(originalRange.end).line;
trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange);
@@ -109120,20 +109114,8 @@ var ts;
annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host);
}
}
function isApplicableFunctionForInference(declaration) {
switch (declaration.kind) {
case 239 /* FunctionDeclaration */:
case 156 /* MethodDeclaration */:
case 157 /* Constructor */:
return true;
case 196 /* FunctionExpression */:
var parent = declaration.parent;
return ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) || !!declaration.name;
}
return false;
}
function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) {
if (!ts.isIdentifier(parameterDeclaration.name) || !isApplicableFunctionForInference(containingFunction)) {
if (!ts.isIdentifier(parameterDeclaration.name)) {
return;
}
var parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken) ||
@@ -109146,12 +109128,17 @@ var ts;
annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host);
}
else {
var needParens = ts.isArrowFunction(containingFunction) && !ts.findChildOfKind(containingFunction, 20 /* OpenParenToken */, sourceFile);
if (needParens)
changes.insertNodeBefore(sourceFile, ts.first(containingFunction.parameters), ts.createToken(20 /* OpenParenToken */));
for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) {
var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type;
if (declaration && !declaration.type && !declaration.initializer) {
annotate(changes, sourceFile, declaration, type, program, host);
}
}
if (needParens)
changes.insertNodeAfter(sourceFile, ts.last(containingFunction.parameters), ts.createToken(21 /* CloseParenToken */));
}
}
function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) {
@@ -109272,6 +109259,7 @@ var ts;
case 157 /* Constructor */:
searchToken = ts.findChildOfKind(containingFunction, 124 /* ConstructorKeyword */, sourceFile);
break;
case 197 /* ArrowFunction */:
case 196 /* FunctionExpression */:
var parent = containingFunction.parent;
searchToken = ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) ?
+14 -26
View File
@@ -84,7 +84,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".1";
ts.version = ts.versionMajorMinor + ".2";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
@@ -97023,14 +97023,11 @@ var ts;
// If already using commonjs, don't introduce ES6.
if (sourceFile.commonJsModuleIndicator)
return false;
// For JS, stay on the safe side.
if (isUncheckedFile)
return false;
// If some file is using ES6 modules, assume that it's OK to add more.
if (ts.programContainsEs6Modules(program))
return true;
// If module transpilation is enabled or we're targeting es6 or above, or not emitting, OK.
return ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions());
if (ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions()))
return true;
// If some file is using ES6 modules, assume that it's OK to add more.
return ts.programContainsEs6Modules(program);
}
function isSnippetScope(scopeNode) {
switch (scopeNode.kind) {
@@ -97829,7 +97826,7 @@ var ts;
}
}
function isFunctionLikeBodyKeyword(kind) {
return kind === 121 /* AsyncKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
return kind === 121 /* AsyncKeyword */ || kind === 122 /* AwaitKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
}
function keywordForNode(node) {
return ts.isIdentifier(node) ? node.originalKeywordKind || 0 /* Unknown */ : node.kind;
@@ -107126,10 +107123,7 @@ var ts;
* Trimming will be done for lines after the previous range
*/
function trimTrailingWhitespacesForRemainingRange() {
if (!previousRange) {
return;
}
var startPosition = previousRange.end;
var startPosition = previousRange ? previousRange.end : originalRange.pos;
var startLine = sourceFile.getLineAndCharacterOfPosition(startPosition).line;
var endLine = sourceFile.getLineAndCharacterOfPosition(originalRange.end).line;
trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange);
@@ -109396,20 +109390,8 @@ var ts;
annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host);
}
}
function isApplicableFunctionForInference(declaration) {
switch (declaration.kind) {
case 239 /* FunctionDeclaration */:
case 156 /* MethodDeclaration */:
case 157 /* Constructor */:
return true;
case 196 /* FunctionExpression */:
var parent = declaration.parent;
return ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) || !!declaration.name;
}
return false;
}
function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) {
if (!ts.isIdentifier(parameterDeclaration.name) || !isApplicableFunctionForInference(containingFunction)) {
if (!ts.isIdentifier(parameterDeclaration.name)) {
return;
}
var parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken) ||
@@ -109422,12 +109404,17 @@ var ts;
annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host);
}
else {
var needParens = ts.isArrowFunction(containingFunction) && !ts.findChildOfKind(containingFunction, 20 /* OpenParenToken */, sourceFile);
if (needParens)
changes.insertNodeBefore(sourceFile, ts.first(containingFunction.parameters), ts.createToken(20 /* OpenParenToken */));
for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) {
var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type;
if (declaration && !declaration.type && !declaration.initializer) {
annotate(changes, sourceFile, declaration, type, program, host);
}
}
if (needParens)
changes.insertNodeAfter(sourceFile, ts.last(containingFunction.parameters), ts.createToken(21 /* CloseParenToken */));
}
}
function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) {
@@ -109548,6 +109535,7 @@ var ts;
case 157 /* Constructor */:
searchToken = ts.findChildOfKind(containingFunction, 124 /* ConstructorKeyword */, sourceFile);
break;
case 197 /* ArrowFunction */:
case 196 /* FunctionExpression */:
var parent = containingFunction.parent;
searchToken = ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) ?
+14 -26
View File
@@ -75,7 +75,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".1";
ts.version = ts.versionMajorMinor + ".2";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
@@ -97014,14 +97014,11 @@ var ts;
// If already using commonjs, don't introduce ES6.
if (sourceFile.commonJsModuleIndicator)
return false;
// For JS, stay on the safe side.
if (isUncheckedFile)
return false;
// If some file is using ES6 modules, assume that it's OK to add more.
if (ts.programContainsEs6Modules(program))
return true;
// If module transpilation is enabled or we're targeting es6 or above, or not emitting, OK.
return ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions());
if (ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions()))
return true;
// If some file is using ES6 modules, assume that it's OK to add more.
return ts.programContainsEs6Modules(program);
}
function isSnippetScope(scopeNode) {
switch (scopeNode.kind) {
@@ -97820,7 +97817,7 @@ var ts;
}
}
function isFunctionLikeBodyKeyword(kind) {
return kind === 121 /* AsyncKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
return kind === 121 /* AsyncKeyword */ || kind === 122 /* AwaitKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
}
function keywordForNode(node) {
return ts.isIdentifier(node) ? node.originalKeywordKind || 0 /* Unknown */ : node.kind;
@@ -107117,10 +107114,7 @@ var ts;
* Trimming will be done for lines after the previous range
*/
function trimTrailingWhitespacesForRemainingRange() {
if (!previousRange) {
return;
}
var startPosition = previousRange.end;
var startPosition = previousRange ? previousRange.end : originalRange.pos;
var startLine = sourceFile.getLineAndCharacterOfPosition(startPosition).line;
var endLine = sourceFile.getLineAndCharacterOfPosition(originalRange.end).line;
trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange);
@@ -109387,20 +109381,8 @@ var ts;
annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host);
}
}
function isApplicableFunctionForInference(declaration) {
switch (declaration.kind) {
case 239 /* FunctionDeclaration */:
case 156 /* MethodDeclaration */:
case 157 /* Constructor */:
return true;
case 196 /* FunctionExpression */:
var parent = declaration.parent;
return ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) || !!declaration.name;
}
return false;
}
function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) {
if (!ts.isIdentifier(parameterDeclaration.name) || !isApplicableFunctionForInference(containingFunction)) {
if (!ts.isIdentifier(parameterDeclaration.name)) {
return;
}
var parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken) ||
@@ -109413,12 +109395,17 @@ var ts;
annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host);
}
else {
var needParens = ts.isArrowFunction(containingFunction) && !ts.findChildOfKind(containingFunction, 20 /* OpenParenToken */, sourceFile);
if (needParens)
changes.insertNodeBefore(sourceFile, ts.first(containingFunction.parameters), ts.createToken(20 /* OpenParenToken */));
for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) {
var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type;
if (declaration && !declaration.type && !declaration.initializer) {
annotate(changes, sourceFile, declaration, type, program, host);
}
}
if (needParens)
changes.insertNodeAfter(sourceFile, ts.last(containingFunction.parameters), ts.createToken(21 /* CloseParenToken */));
}
}
function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) {
@@ -109539,6 +109526,7 @@ var ts;
case 157 /* Constructor */:
searchToken = ts.findChildOfKind(containingFunction, 124 /* ConstructorKeyword */, sourceFile);
break;
case 197 /* ArrowFunction */:
case 196 /* FunctionExpression */:
var parent = containingFunction.parent;
searchToken = ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) ?
+14 -26
View File
@@ -75,7 +75,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".1";
ts.version = ts.versionMajorMinor + ".2";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
@@ -97014,14 +97014,11 @@ var ts;
// If already using commonjs, don't introduce ES6.
if (sourceFile.commonJsModuleIndicator)
return false;
// For JS, stay on the safe side.
if (isUncheckedFile)
return false;
// If some file is using ES6 modules, assume that it's OK to add more.
if (ts.programContainsEs6Modules(program))
return true;
// If module transpilation is enabled or we're targeting es6 or above, or not emitting, OK.
return ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions());
if (ts.compilerOptionsIndicateEs6Modules(program.getCompilerOptions()))
return true;
// If some file is using ES6 modules, assume that it's OK to add more.
return ts.programContainsEs6Modules(program);
}
function isSnippetScope(scopeNode) {
switch (scopeNode.kind) {
@@ -97820,7 +97817,7 @@ var ts;
}
}
function isFunctionLikeBodyKeyword(kind) {
return kind === 121 /* AsyncKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
return kind === 121 /* AsyncKeyword */ || kind === 122 /* AwaitKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
}
function keywordForNode(node) {
return ts.isIdentifier(node) ? node.originalKeywordKind || 0 /* Unknown */ : node.kind;
@@ -107117,10 +107114,7 @@ var ts;
* Trimming will be done for lines after the previous range
*/
function trimTrailingWhitespacesForRemainingRange() {
if (!previousRange) {
return;
}
var startPosition = previousRange.end;
var startPosition = previousRange ? previousRange.end : originalRange.pos;
var startLine = sourceFile.getLineAndCharacterOfPosition(startPosition).line;
var endLine = sourceFile.getLineAndCharacterOfPosition(originalRange.end).line;
trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange);
@@ -109387,20 +109381,8 @@ var ts;
annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host);
}
}
function isApplicableFunctionForInference(declaration) {
switch (declaration.kind) {
case 239 /* FunctionDeclaration */:
case 156 /* MethodDeclaration */:
case 157 /* Constructor */:
return true;
case 196 /* FunctionExpression */:
var parent = declaration.parent;
return ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) || !!declaration.name;
}
return false;
}
function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) {
if (!ts.isIdentifier(parameterDeclaration.name) || !isApplicableFunctionForInference(containingFunction)) {
if (!ts.isIdentifier(parameterDeclaration.name)) {
return;
}
var parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken) ||
@@ -109413,12 +109395,17 @@ var ts;
annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host);
}
else {
var needParens = ts.isArrowFunction(containingFunction) && !ts.findChildOfKind(containingFunction, 20 /* OpenParenToken */, sourceFile);
if (needParens)
changes.insertNodeBefore(sourceFile, ts.first(containingFunction.parameters), ts.createToken(20 /* OpenParenToken */));
for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) {
var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type;
if (declaration && !declaration.type && !declaration.initializer) {
annotate(changes, sourceFile, declaration, type, program, host);
}
}
if (needParens)
changes.insertNodeAfter(sourceFile, ts.last(containingFunction.parameters), ts.createToken(21 /* CloseParenToken */));
}
}
function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) {
@@ -109539,6 +109526,7 @@ var ts;
case 157 /* Constructor */:
searchToken = ts.findChildOfKind(containingFunction, 124 /* ConstructorKeyword */, sourceFile);
break;
case 197 /* ArrowFunction */:
case 196 /* FunctionExpression */:
var parent = containingFunction.parent;
searchToken = ts.isVariableDeclaration(parent) && ts.isIdentifier(parent.name) ?
+1 -1
View File
@@ -88,7 +88,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".1";
ts.version = ts.versionMajorMinor + ".2";
})(ts || (ts = {}));
(function (ts) {
/* @internal */