This commit is contained in:
Mohamed Hegazy 2016-09-14 13:42:01 -07:00
Родитель 93e0451b5d
Коммит 4ce2280559
8 изменённых файлов: 60 добавлений и 30 удалений

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

@ -14792,8 +14792,13 @@ var ts;
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064, 0, nextFlags);
}
else if (!(flags & 512) && type.flags & (2097152 | 1572864) && type.aliasSymbol) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
if (type.flags & 2097152 || !(flags & 1024)) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
}
else {
writeUnionOrIntersectionType(type, nextFlags);
}
}
else if (type.flags & 1572864) {
writeUnionOrIntersectionType(type, nextFlags);
@ -29039,7 +29044,7 @@ var ts;
}
else {
errorNameNode = declaration.name;
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2, writer);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 | 1024, writer);
errorNameNode = undefined;
}
}
@ -29051,7 +29056,7 @@ var ts;
}
else {
errorNameNode = signature.name;
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2, writer);
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 | 1024, writer);
errorNameNode = undefined;
}
}
@ -29244,7 +29249,7 @@ var ts;
write(tempVarName);
write(": ");
writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2, writer);
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 | 1024, writer);
write(";");
writeLine();
write(node.isExportEquals ? "export = " : "export default ");
@ -29649,7 +29654,7 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2, writer);
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
}
function getHeritageClauseVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;

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

@ -15788,8 +15788,13 @@ var ts;
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064, 0, nextFlags);
}
else if (!(flags & 512) && type.flags & (2097152 | 1572864) && type.aliasSymbol) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
if (type.flags & 2097152 || !(flags & 1024)) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
}
else {
writeUnionOrIntersectionType(type, nextFlags);
}
}
else if (type.flags & 1572864) {
writeUnionOrIntersectionType(type, nextFlags);
@ -30035,7 +30040,7 @@ var ts;
}
else {
errorNameNode = declaration.name;
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2, writer);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 | 1024, writer);
errorNameNode = undefined;
}
}
@ -30047,7 +30052,7 @@ var ts;
}
else {
errorNameNode = signature.name;
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2, writer);
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 | 1024, writer);
errorNameNode = undefined;
}
}
@ -30240,7 +30245,7 @@ var ts;
write(tempVarName);
write(": ");
writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2, writer);
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 | 1024, writer);
write(";");
writeLine();
write(node.isExportEquals ? "export = " : "export default ");
@ -30645,7 +30650,7 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2, writer);
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
}
function getHeritageClauseVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;

1
lib/tsserverlibrary.d.ts поставляемый
Просмотреть файл

@ -1319,6 +1319,7 @@ declare namespace ts {
UseFullyQualifiedType = 128,
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
}
const enum SymbolFormatFlags {
None = 0,

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

@ -15788,8 +15788,13 @@ var ts;
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064, 0, nextFlags);
}
else if (!(flags & 512) && type.flags & (2097152 | 1572864) && type.aliasSymbol) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
if (type.flags & 2097152 || !(flags & 1024)) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
}
else {
writeUnionOrIntersectionType(type, nextFlags);
}
}
else if (type.flags & 1572864) {
writeUnionOrIntersectionType(type, nextFlags);
@ -30035,7 +30040,7 @@ var ts;
}
else {
errorNameNode = declaration.name;
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2, writer);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 | 1024, writer);
errorNameNode = undefined;
}
}
@ -30047,7 +30052,7 @@ var ts;
}
else {
errorNameNode = signature.name;
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2, writer);
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 | 1024, writer);
errorNameNode = undefined;
}
}
@ -30240,7 +30245,7 @@ var ts;
write(tempVarName);
write(": ");
writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2, writer);
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 | 1024, writer);
write(";");
writeLine();
write(node.isExportEquals ? "export = " : "export default ");
@ -30645,7 +30650,7 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2, writer);
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
}
function getHeritageClauseVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;

1
lib/typescript.d.ts поставляемый
Просмотреть файл

@ -1328,6 +1328,7 @@ declare namespace ts {
UseFullyQualifiedType = 128,
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
}
enum SymbolFormatFlags {
None = 0,

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

@ -480,6 +480,7 @@ var ts;
TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType";
TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument";
TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias";
TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue";
})(ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var TypeFormatFlags = ts.TypeFormatFlags;
(function (SymbolFormatFlags) {
@ -18432,8 +18433,13 @@ var ts;
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
}
else if (!(flags & 512 /* InTypeAlias */) && type.flags & (2097152 /* Anonymous */ | 1572864 /* UnionOrIntersection */) && type.aliasSymbol) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
if (type.flags & 2097152 /* Anonymous */ || !(flags & 1024 /* UseTypeAliasValue */)) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
}
else {
writeUnionOrIntersectionType(type, nextFlags);
}
}
else if (type.flags & 1572864 /* UnionOrIntersection */) {
writeUnionOrIntersectionType(type, nextFlags);
@ -35233,7 +35239,7 @@ var ts;
}
else {
errorNameNode = declaration.name;
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
errorNameNode = undefined;
}
}
@ -35246,7 +35252,7 @@ var ts;
}
else {
errorNameNode = signature.name;
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
errorNameNode = undefined;
}
}
@ -35448,7 +35454,7 @@ var ts;
write(tempVarName);
write(": ");
writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
write(";");
writeLine();
write(node.isExportEquals ? "export = " : "export default ");
@ -35869,7 +35875,7 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
}
function getHeritageClauseVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;

1
lib/typescriptServices.d.ts поставляемый
Просмотреть файл

@ -1328,6 +1328,7 @@ declare namespace ts {
UseFullyQualifiedType = 128,
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
}
enum SymbolFormatFlags {
None = 0,

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

@ -480,6 +480,7 @@ var ts;
TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType";
TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument";
TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias";
TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue";
})(ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var TypeFormatFlags = ts.TypeFormatFlags;
(function (SymbolFormatFlags) {
@ -18432,8 +18433,13 @@ var ts;
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
}
else if (!(flags & 512 /* InTypeAlias */) && type.flags & (2097152 /* Anonymous */ | 1572864 /* UnionOrIntersection */) && type.aliasSymbol) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
if (type.flags & 2097152 /* Anonymous */ || !(flags & 1024 /* UseTypeAliasValue */)) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
}
else {
writeUnionOrIntersectionType(type, nextFlags);
}
}
else if (type.flags & 1572864 /* UnionOrIntersection */) {
writeUnionOrIntersectionType(type, nextFlags);
@ -35233,7 +35239,7 @@ var ts;
}
else {
errorNameNode = declaration.name;
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
errorNameNode = undefined;
}
}
@ -35246,7 +35252,7 @@ var ts;
}
else {
errorNameNode = signature.name;
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
errorNameNode = undefined;
}
}
@ -35448,7 +35454,7 @@ var ts;
write(tempVarName);
write(": ");
writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
write(";");
writeLine();
write(node.isExportEquals ? "export = " : "export default ");
@ -35869,7 +35875,7 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer);
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
}
function getHeritageClauseVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;