This commit is contained in:
Mohamed Hegazy 2016-09-14 13:30:16 -07:00
Родитель b6aeaab019
Коммит 0c443c2569
5 изменённых файлов: 115 добавлений и 35 удалений

Просмотреть файл

@ -13414,6 +13414,7 @@ var ts;
var assignableRelation = ts.createMap();
var comparableRelation = ts.createMap();
var identityRelation = ts.createMap();
var enumRelation = ts.createMap();
var _displayBuilder;
var builtinGlobals = ts.createMap();
builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
@ -18129,8 +18130,14 @@ var ts;
if (source === target) {
return true;
}
if (source.symbol.name !== target.symbol.name || !(source.symbol.flags & 256) || !(target.symbol.flags & 256)) {
return false;
var id = source.id + "," + target.id;
if (enumRelation[id] !== undefined) {
return enumRelation[id];
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256) || !(target.symbol.flags & 256) ||
(source.flags & 524288) !== (target.flags & 524288)) {
return enumRelation[id] = false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@ -18141,11 +18148,11 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
}
return false;
return enumRelation[id] = false;
}
}
}
return true;
return enumRelation[id] = true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192)
@ -18169,10 +18176,19 @@ var ts;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1)
return true;
if (source.flags & (4 | 64) && target.flags & 16)
if ((source.flags & 4 | source.flags & 64) && target.flags & 272)
return true;
if (source.flags & 64 && target.flags & 256 && source.text === target.text)
if (source.flags & 256 &&
target.flags & 256 &&
source.text === target.text &&
isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
return true;
}
if (source.flags & 256 &&
target.flags & 16 &&
isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
return true;
}
}
return false;
}
@ -36543,7 +36559,7 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.version = "2.0.2";
ts.version = "2.0.3";
var emptyArray = [];
function findConfigFile(searchPath, fileExists) {
while (true) {

Просмотреть файл

@ -14410,6 +14410,7 @@ var ts;
var assignableRelation = ts.createMap();
var comparableRelation = ts.createMap();
var identityRelation = ts.createMap();
var enumRelation = ts.createMap();
var _displayBuilder;
var builtinGlobals = ts.createMap();
builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
@ -19125,8 +19126,14 @@ var ts;
if (source === target) {
return true;
}
if (source.symbol.name !== target.symbol.name || !(source.symbol.flags & 256) || !(target.symbol.flags & 256)) {
return false;
var id = source.id + "," + target.id;
if (enumRelation[id] !== undefined) {
return enumRelation[id];
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256) || !(target.symbol.flags & 256) ||
(source.flags & 524288) !== (target.flags & 524288)) {
return enumRelation[id] = false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@ -19137,11 +19144,11 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
}
return false;
return enumRelation[id] = false;
}
}
}
return true;
return enumRelation[id] = true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192)
@ -19165,10 +19172,19 @@ var ts;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1)
return true;
if (source.flags & (4 | 64) && target.flags & 16)
if ((source.flags & 4 | source.flags & 64) && target.flags & 272)
return true;
if (source.flags & 64 && target.flags & 256 && source.text === target.text)
if (source.flags & 256 &&
target.flags & 256 &&
source.text === target.text &&
isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
return true;
}
if (source.flags & 256 &&
target.flags & 16 &&
isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
return true;
}
}
return false;
}
@ -37539,7 +37555,7 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.version = "2.0.2";
ts.version = "2.0.3";
var emptyArray = [];
function findConfigFile(searchPath, fileExists) {
while (true) {

Просмотреть файл

@ -14410,6 +14410,7 @@ var ts;
var assignableRelation = ts.createMap();
var comparableRelation = ts.createMap();
var identityRelation = ts.createMap();
var enumRelation = ts.createMap();
var _displayBuilder;
var builtinGlobals = ts.createMap();
builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
@ -19125,8 +19126,14 @@ var ts;
if (source === target) {
return true;
}
if (source.symbol.name !== target.symbol.name || !(source.symbol.flags & 256) || !(target.symbol.flags & 256)) {
return false;
var id = source.id + "," + target.id;
if (enumRelation[id] !== undefined) {
return enumRelation[id];
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256) || !(target.symbol.flags & 256) ||
(source.flags & 524288) !== (target.flags & 524288)) {
return enumRelation[id] = false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@ -19137,11 +19144,11 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
}
return false;
return enumRelation[id] = false;
}
}
}
return true;
return enumRelation[id] = true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192)
@ -19165,10 +19172,19 @@ var ts;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1)
return true;
if (source.flags & (4 | 64) && target.flags & 16)
if ((source.flags & 4 | source.flags & 64) && target.flags & 272)
return true;
if (source.flags & 64 && target.flags & 256 && source.text === target.text)
if (source.flags & 256 &&
target.flags & 256 &&
source.text === target.text &&
isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
return true;
}
if (source.flags & 256 &&
target.flags & 16 &&
isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
return true;
}
}
return false;
}
@ -37539,7 +37555,7 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.version = "2.0.2";
ts.version = "2.0.3";
var emptyArray = [];
function findConfigFile(searchPath, fileExists) {
while (true) {

Просмотреть файл

@ -16791,6 +16791,7 @@ var ts;
var assignableRelation = ts.createMap();
var comparableRelation = ts.createMap();
var identityRelation = ts.createMap();
var enumRelation = ts.createMap();
// This is for caching the result of getSymbolDisplayBuilder. Do not access directly.
var _displayBuilder;
var TypeSystemPropertyName;
@ -22135,8 +22136,14 @@ var ts;
if (source === target) {
return true;
}
if (source.symbol.name !== target.symbol.name || !(source.symbol.flags & 256 /* RegularEnum */) || !(target.symbol.flags & 256 /* RegularEnum */)) {
return false;
var id = source.id + "," + target.id;
if (enumRelation[id] !== undefined) {
return enumRelation[id];
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256 /* RegularEnum */) || !(target.symbol.flags & 256 /* RegularEnum */) ||
(source.flags & 524288 /* Union */) !== (target.flags & 524288 /* Union */)) {
return enumRelation[id] = false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@ -22147,11 +22154,11 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */));
}
return false;
return enumRelation[id] = false;
}
}
}
return true;
return enumRelation[id] = true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192 /* Never */)
@ -22175,10 +22182,19 @@ var ts;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1 /* Any */)
return true;
if (source.flags & (4 /* Number */ | 64 /* NumberLiteral */) && target.flags & 16 /* Enum */)
if ((source.flags & 4 /* Number */ | source.flags & 64 /* NumberLiteral */) && target.flags & 272 /* EnumLike */)
return true;
if (source.flags & 64 /* NumberLiteral */ && target.flags & 256 /* EnumLiteral */ && source.text === target.text)
if (source.flags & 256 /* EnumLiteral */ &&
target.flags & 256 /* EnumLiteral */ &&
source.text === target.text &&
isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
return true;
}
if (source.flags & 256 /* EnumLiteral */ &&
target.flags & 16 /* Enum */ &&
isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
return true;
}
}
return false;
}
@ -43950,7 +43966,7 @@ var ts;
var ts;
(function (ts) {
/** The version of the TypeScript compiler release */
ts.version = "2.0.2";
ts.version = "2.0.3";
var emptyArray = [];
function findConfigFile(searchPath, fileExists) {
while (true) {

Просмотреть файл

@ -16791,6 +16791,7 @@ var ts;
var assignableRelation = ts.createMap();
var comparableRelation = ts.createMap();
var identityRelation = ts.createMap();
var enumRelation = ts.createMap();
// This is for caching the result of getSymbolDisplayBuilder. Do not access directly.
var _displayBuilder;
var TypeSystemPropertyName;
@ -22135,8 +22136,14 @@ var ts;
if (source === target) {
return true;
}
if (source.symbol.name !== target.symbol.name || !(source.symbol.flags & 256 /* RegularEnum */) || !(target.symbol.flags & 256 /* RegularEnum */)) {
return false;
var id = source.id + "," + target.id;
if (enumRelation[id] !== undefined) {
return enumRelation[id];
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256 /* RegularEnum */) || !(target.symbol.flags & 256 /* RegularEnum */) ||
(source.flags & 524288 /* Union */) !== (target.flags & 524288 /* Union */)) {
return enumRelation[id] = false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@ -22147,11 +22154,11 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */));
}
return false;
return enumRelation[id] = false;
}
}
}
return true;
return enumRelation[id] = true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192 /* Never */)
@ -22175,10 +22182,19 @@ var ts;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1 /* Any */)
return true;
if (source.flags & (4 /* Number */ | 64 /* NumberLiteral */) && target.flags & 16 /* Enum */)
if ((source.flags & 4 /* Number */ | source.flags & 64 /* NumberLiteral */) && target.flags & 272 /* EnumLike */)
return true;
if (source.flags & 64 /* NumberLiteral */ && target.flags & 256 /* EnumLiteral */ && source.text === target.text)
if (source.flags & 256 /* EnumLiteral */ &&
target.flags & 256 /* EnumLiteral */ &&
source.text === target.text &&
isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
return true;
}
if (source.flags & 256 /* EnumLiteral */ &&
target.flags & 16 /* Enum */ &&
isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
return true;
}
}
return false;
}
@ -43950,7 +43966,7 @@ var ts;
var ts;
(function (ts) {
/** The version of the TypeScript compiler release */
ts.version = "2.0.2";
ts.version = "2.0.3";
var emptyArray = [];
function findConfigFile(searchPath, fileExists) {
while (true) {