mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Update LKG
This commit is contained in:
1 parent
7afaef1067
commit
49dfb5ff55
6 files changed
+97
-65
No files matched your search
+12
-10
@@ -8773,13 +8773,6 @@ var ts;
|
||||
isBindableStaticNameExpression(expr.arguments[0], true);
|
||||
}
|
||||
ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall;
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticElementAccessExpression(node.expression, true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
function isLiteralLikeAccess(node) {
|
||||
return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node);
|
||||
}
|
||||
@@ -8794,6 +8787,13 @@ var ts;
|
||||
|| isBindableStaticElementAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression;
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticAccessExpression(node.expression, true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
function isBindableStaticNameExpression(node, excludeThisKeyword) {
|
||||
return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
@@ -8822,7 +8822,7 @@ var ts;
|
||||
if (expr.operatorToken.kind !== 62 || !isAccessExpression(expr.left)) {
|
||||
return 0;
|
||||
}
|
||||
if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
if (isBindableStaticNameExpression(expr.left.expression, true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
return 6;
|
||||
}
|
||||
return getAssignmentDeclarationPropertyAccessKind(expr.left);
|
||||
@@ -8875,7 +8875,9 @@ var ts;
|
||||
isBindableStaticAccessExpression(lhs)) {
|
||||
return 1;
|
||||
}
|
||||
return 5;
|
||||
if (isBindableStaticNameExpression(lhs, true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103)) {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -25553,7 +25555,7 @@ var ts;
|
||||
constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);
|
||||
}
|
||||
}
|
||||
if (constructorSymbol) {
|
||||
if (constructorSymbol && constructorSymbol.valueDeclaration) {
|
||||
constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable();
|
||||
if (ts.hasDynamicName(node)) {
|
||||
bindDynamicallyNamedThisPropertyAssignment(node, constructorSymbol);
|
||||
|
||||
+17
-11
@@ -11566,27 +11566,31 @@ var ts;
|
||||
isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true);
|
||||
}
|
||||
ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall;
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
/** x.y OR x[0] */
|
||||
function isLiteralLikeAccess(node) {
|
||||
return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node);
|
||||
}
|
||||
ts.isLiteralLikeAccess = isLiteralLikeAccess;
|
||||
/** x[0] OR x['a'] OR x[Symbol.y] */
|
||||
function isLiteralLikeElementAccess(node) {
|
||||
return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) ||
|
||||
isWellKnownSymbolSyntactically(node.argumentExpression));
|
||||
}
|
||||
ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess;
|
||||
/** Any series of property and element accesses. */
|
||||
function isBindableStaticAccessExpression(node, excludeThisKeyword) {
|
||||
return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true))
|
||||
|| isBindableStaticElementAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression;
|
||||
/** Any series of property and element accesses, ending in a literal element access */
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
function isBindableStaticNameExpression(node, excludeThisKeyword) {
|
||||
return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
@@ -11615,7 +11619,7 @@ var ts;
|
||||
if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) {
|
||||
return 0 /* None */;
|
||||
}
|
||||
if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
// F.prototype = { ... }
|
||||
return 6 /* Prototype */;
|
||||
}
|
||||
@@ -11678,8 +11682,10 @@ var ts;
|
||||
// exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ...
|
||||
return 1 /* ExportsProperty */;
|
||||
}
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) {
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
}
|
||||
}
|
||||
return 0 /* None */;
|
||||
}
|
||||
@@ -31294,7 +31300,7 @@ var ts;
|
||||
constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);
|
||||
}
|
||||
}
|
||||
if (constructorSymbol) {
|
||||
if (constructorSymbol && constructorSymbol.valueDeclaration) {
|
||||
// Declare a 'member' if the container is an ES5 class or ES6 constructor
|
||||
constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable();
|
||||
// It's acceptable for multiple 'this' assignments of the same identifier to occur
|
||||
|
||||
+17
-11
@@ -11716,27 +11716,31 @@ var ts;
|
||||
isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true);
|
||||
}
|
||||
ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall;
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
/** x.y OR x[0] */
|
||||
function isLiteralLikeAccess(node) {
|
||||
return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node);
|
||||
}
|
||||
ts.isLiteralLikeAccess = isLiteralLikeAccess;
|
||||
/** x[0] OR x['a'] OR x[Symbol.y] */
|
||||
function isLiteralLikeElementAccess(node) {
|
||||
return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) ||
|
||||
isWellKnownSymbolSyntactically(node.argumentExpression));
|
||||
}
|
||||
ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess;
|
||||
/** Any series of property and element accesses. */
|
||||
function isBindableStaticAccessExpression(node, excludeThisKeyword) {
|
||||
return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true))
|
||||
|| isBindableStaticElementAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression;
|
||||
/** Any series of property and element accesses, ending in a literal element access */
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
function isBindableStaticNameExpression(node, excludeThisKeyword) {
|
||||
return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
@@ -11765,7 +11769,7 @@ var ts;
|
||||
if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) {
|
||||
return 0 /* None */;
|
||||
}
|
||||
if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
// F.prototype = { ... }
|
||||
return 6 /* Prototype */;
|
||||
}
|
||||
@@ -11828,8 +11832,10 @@ var ts;
|
||||
// exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ...
|
||||
return 1 /* ExportsProperty */;
|
||||
}
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) {
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
}
|
||||
}
|
||||
return 0 /* None */;
|
||||
}
|
||||
@@ -31444,7 +31450,7 @@ var ts;
|
||||
constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);
|
||||
}
|
||||
}
|
||||
if (constructorSymbol) {
|
||||
if (constructorSymbol && constructorSymbol.valueDeclaration) {
|
||||
// Declare a 'member' if the container is an ES5 class or ES6 constructor
|
||||
constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable();
|
||||
// It's acceptable for multiple 'this' assignments of the same identifier to occur
|
||||
|
||||
+17
-11
@@ -11705,27 +11705,31 @@ var ts;
|
||||
isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true);
|
||||
}
|
||||
ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall;
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
/** x.y OR x[0] */
|
||||
function isLiteralLikeAccess(node) {
|
||||
return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node);
|
||||
}
|
||||
ts.isLiteralLikeAccess = isLiteralLikeAccess;
|
||||
/** x[0] OR x['a'] OR x[Symbol.y] */
|
||||
function isLiteralLikeElementAccess(node) {
|
||||
return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) ||
|
||||
isWellKnownSymbolSyntactically(node.argumentExpression));
|
||||
}
|
||||
ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess;
|
||||
/** Any series of property and element accesses. */
|
||||
function isBindableStaticAccessExpression(node, excludeThisKeyword) {
|
||||
return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true))
|
||||
|| isBindableStaticElementAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression;
|
||||
/** Any series of property and element accesses, ending in a literal element access */
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
function isBindableStaticNameExpression(node, excludeThisKeyword) {
|
||||
return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
@@ -11754,7 +11758,7 @@ var ts;
|
||||
if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) {
|
||||
return 0 /* None */;
|
||||
}
|
||||
if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
// F.prototype = { ... }
|
||||
return 6 /* Prototype */;
|
||||
}
|
||||
@@ -11817,8 +11821,10 @@ var ts;
|
||||
// exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ...
|
||||
return 1 /* ExportsProperty */;
|
||||
}
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) {
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
}
|
||||
}
|
||||
return 0 /* None */;
|
||||
}
|
||||
@@ -31433,7 +31439,7 @@ var ts;
|
||||
constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);
|
||||
}
|
||||
}
|
||||
if (constructorSymbol) {
|
||||
if (constructorSymbol && constructorSymbol.valueDeclaration) {
|
||||
// Declare a 'member' if the container is an ES5 class or ES6 constructor
|
||||
constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable();
|
||||
// It's acceptable for multiple 'this' assignments of the same identifier to occur
|
||||
|
||||
+17
-11
@@ -11705,27 +11705,31 @@ var ts;
|
||||
isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true);
|
||||
}
|
||||
ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall;
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
/** x.y OR x[0] */
|
||||
function isLiteralLikeAccess(node) {
|
||||
return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node);
|
||||
}
|
||||
ts.isLiteralLikeAccess = isLiteralLikeAccess;
|
||||
/** x[0] OR x['a'] OR x[Symbol.y] */
|
||||
function isLiteralLikeElementAccess(node) {
|
||||
return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) ||
|
||||
isWellKnownSymbolSyntactically(node.argumentExpression));
|
||||
}
|
||||
ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess;
|
||||
/** Any series of property and element accesses. */
|
||||
function isBindableStaticAccessExpression(node, excludeThisKeyword) {
|
||||
return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true))
|
||||
|| isBindableStaticElementAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression;
|
||||
/** Any series of property and element accesses, ending in a literal element access */
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
function isBindableStaticNameExpression(node, excludeThisKeyword) {
|
||||
return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
@@ -11754,7 +11758,7 @@ var ts;
|
||||
if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) {
|
||||
return 0 /* None */;
|
||||
}
|
||||
if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
// F.prototype = { ... }
|
||||
return 6 /* Prototype */;
|
||||
}
|
||||
@@ -11817,8 +11821,10 @@ var ts;
|
||||
// exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ...
|
||||
return 1 /* ExportsProperty */;
|
||||
}
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) {
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
}
|
||||
}
|
||||
return 0 /* None */;
|
||||
}
|
||||
@@ -31433,7 +31439,7 @@ var ts;
|
||||
constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);
|
||||
}
|
||||
}
|
||||
if (constructorSymbol) {
|
||||
if (constructorSymbol && constructorSymbol.valueDeclaration) {
|
||||
// Declare a 'member' if the container is an ES5 class or ES6 constructor
|
||||
constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable();
|
||||
// It's acceptable for multiple 'this' assignments of the same identifier to occur
|
||||
|
||||
+17
-11
@@ -11555,27 +11555,31 @@ var ts;
|
||||
isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true);
|
||||
}
|
||||
ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall;
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
/** x.y OR x[0] */
|
||||
function isLiteralLikeAccess(node) {
|
||||
return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node);
|
||||
}
|
||||
ts.isLiteralLikeAccess = isLiteralLikeAccess;
|
||||
/** x[0] OR x['a'] OR x[Symbol.y] */
|
||||
function isLiteralLikeElementAccess(node) {
|
||||
return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) ||
|
||||
isWellKnownSymbolSyntactically(node.argumentExpression));
|
||||
}
|
||||
ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess;
|
||||
/** Any series of property and element accesses. */
|
||||
function isBindableStaticAccessExpression(node, excludeThisKeyword) {
|
||||
return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true))
|
||||
|| isBindableStaticElementAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression;
|
||||
/** Any series of property and element accesses, ending in a literal element access */
|
||||
function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
|
||||
return isLiteralLikeElementAccess(node)
|
||||
&& ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) ||
|
||||
isEntityNameExpression(node.expression) ||
|
||||
isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true));
|
||||
}
|
||||
ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression;
|
||||
function isBindableStaticNameExpression(node, excludeThisKeyword) {
|
||||
return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword);
|
||||
}
|
||||
@@ -11604,7 +11608,7 @@ var ts;
|
||||
if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) {
|
||||
return 0 /* None */;
|
||||
}
|
||||
if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
|
||||
// F.prototype = { ... }
|
||||
return 6 /* Prototype */;
|
||||
}
|
||||
@@ -11667,8 +11671,10 @@ var ts;
|
||||
// exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ...
|
||||
return 1 /* ExportsProperty */;
|
||||
}
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) {
|
||||
// F.G...x = expr
|
||||
return 5 /* Property */;
|
||||
}
|
||||
}
|
||||
return 0 /* None */;
|
||||
}
|
||||
@@ -31283,7 +31289,7 @@ var ts;
|
||||
constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);
|
||||
}
|
||||
}
|
||||
if (constructorSymbol) {
|
||||
if (constructorSymbol && constructorSymbol.valueDeclaration) {
|
||||
// Declare a 'member' if the container is an ES5 class or ES6 constructor
|
||||
constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable();
|
||||
// It's acceptable for multiple 'this' assignments of the same identifier to occur
|
||||
|
||||
Reference in new issue
Block a user