Update LKG

This commit is contained in:
Mohamed Hegazy 2017-05-15 16:17:10 -07:00
parent 9d2656fe54
commit 2dd4c8af07
5 changed files with 70 additions and 15 deletions

View File

@ -31272,6 +31272,7 @@ var ts;
var spread = emptyObjectType;
var attributesArray = [];
var hasSpreadAnyType = false;
var typeToIntersect;
var explicitlySpecifyChildrenAttribute = false;
var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
@ -31302,11 +31303,16 @@ var ts;
attributesArray = [];
attributesTable = ts.createMap();
}
var exprType = getApparentType(checkExpression(attributeDecl.expression));
var exprType = checkExpression(attributeDecl.expression);
if (isTypeAny(exprType)) {
hasSpreadAnyType = true;
}
spread = getSpreadType(spread, exprType);
if (isValidSpreadType(exprType)) {
spread = getSpreadType(spread, exprType);
}
else {
typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
}
}
if (!hasSpreadAnyType) {
@ -31352,7 +31358,12 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
return hasSpreadAnyType ? anyType : createJsxAttributesType(attributes.symbol, attributesTable);
if (hasSpreadAnyType) {
return anyType;
}
var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
typeToIntersect ? typeToIntersect : attributeType;
function createJsxAttributesType(symbol, attributesTable) {
var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined);
result.flags |= 33554432 | 4194304;

View File

@ -32436,6 +32436,7 @@ var ts;
var spread = emptyObjectType;
var attributesArray = [];
var hasSpreadAnyType = false;
var typeToIntersect;
var explicitlySpecifyChildrenAttribute = false;
var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
@ -32466,11 +32467,16 @@ var ts;
attributesArray = [];
attributesTable = ts.createMap();
}
var exprType = getApparentType(checkExpression(attributeDecl.expression));
var exprType = checkExpression(attributeDecl.expression);
if (isTypeAny(exprType)) {
hasSpreadAnyType = true;
}
spread = getSpreadType(spread, exprType);
if (isValidSpreadType(exprType)) {
spread = getSpreadType(spread, exprType);
}
else {
typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
}
}
if (!hasSpreadAnyType) {
@ -32516,7 +32522,12 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
return hasSpreadAnyType ? anyType : createJsxAttributesType(attributes.symbol, attributesTable);
if (hasSpreadAnyType) {
return anyType;
}
var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
typeToIntersect ? typeToIntersect : attributeType;
function createJsxAttributesType(symbol, attributesTable) {
var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined);
result.flags |= 33554432 | 4194304;

View File

@ -33782,6 +33782,7 @@ var ts;
var spread = emptyObjectType;
var attributesArray = [];
var hasSpreadAnyType = false;
var typeToIntersect;
var explicitlySpecifyChildrenAttribute = false;
var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
@ -33812,11 +33813,16 @@ var ts;
attributesArray = [];
attributesTable = ts.createMap();
}
var exprType = getApparentType(checkExpression(attributeDecl.expression));
var exprType = checkExpression(attributeDecl.expression);
if (isTypeAny(exprType)) {
hasSpreadAnyType = true;
}
spread = getSpreadType(spread, exprType);
if (isValidSpreadType(exprType)) {
spread = getSpreadType(spread, exprType);
}
else {
typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
}
}
if (!hasSpreadAnyType) {
@ -33862,7 +33868,12 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
return hasSpreadAnyType ? anyType : createJsxAttributesType(attributes.symbol, attributesTable);
if (hasSpreadAnyType) {
return anyType;
}
var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
typeToIntersect ? typeToIntersect : attributeType;
function createJsxAttributesType(symbol, attributesTable) {
var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined);
result.flags |= 33554432 | 4194304;

View File

@ -37595,6 +37595,7 @@ var ts;
var spread = emptyObjectType;
var attributesArray = [];
var hasSpreadAnyType = false;
var typeToIntersect;
var explicitlySpecifyChildrenAttribute = false;
var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
@ -37625,11 +37626,16 @@ var ts;
attributesArray = [];
attributesTable = ts.createMap();
}
var exprType = getApparentType(checkExpression(attributeDecl.expression));
var exprType = checkExpression(attributeDecl.expression);
if (isTypeAny(exprType)) {
hasSpreadAnyType = true;
}
spread = getSpreadType(spread, exprType);
if (isValidSpreadType(exprType)) {
spread = getSpreadType(spread, exprType);
}
else {
typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
}
}
if (!hasSpreadAnyType) {
@ -37683,7 +37689,12 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
return hasSpreadAnyType ? anyType : createJsxAttributesType(attributes.symbol, attributesTable);
if (hasSpreadAnyType) {
return anyType;
}
var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
typeToIntersect ? typeToIntersect : attributeType;
/**
* Create anonymous type from given attributes symbol table.
* @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable

View File

@ -37595,6 +37595,7 @@ var ts;
var spread = emptyObjectType;
var attributesArray = [];
var hasSpreadAnyType = false;
var typeToIntersect;
var explicitlySpecifyChildrenAttribute = false;
var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
@ -37625,11 +37626,16 @@ var ts;
attributesArray = [];
attributesTable = ts.createMap();
}
var exprType = getApparentType(checkExpression(attributeDecl.expression));
var exprType = checkExpression(attributeDecl.expression);
if (isTypeAny(exprType)) {
hasSpreadAnyType = true;
}
spread = getSpreadType(spread, exprType);
if (isValidSpreadType(exprType)) {
spread = getSpreadType(spread, exprType);
}
else {
typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
}
}
if (!hasSpreadAnyType) {
@ -37683,7 +37689,12 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
return hasSpreadAnyType ? anyType : createJsxAttributesType(attributes.symbol, attributesTable);
if (hasSpreadAnyType) {
return anyType;
}
var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
typeToIntersect ? typeToIntersect : attributeType;
/**
* Create anonymous type from given attributes symbol table.
* @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable