Skip to content

Commit 9dafe8b

Browse files
committed
Merge branch 'release-2.3' of https://github.com/Microsoft/TypeScript into release-2.3
2 parents 1e39e6c + 6beaafc commit 9dafe8b

10 files changed

+1500
-1026
lines changed

lib/tsc.js

Lines changed: 252 additions & 177 deletions
Large diffs are not rendered by default.

lib/tsserver.js

Lines changed: 273 additions & 193 deletions
Large diffs are not rendered by default.

lib/tsserverlibrary.d.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,14 +2195,15 @@ declare namespace ts {
21952195
HelperName = 4096,
21962196
ExportName = 8192,
21972197
LocalName = 16384,
2198-
Indented = 32768,
2199-
NoIndentation = 65536,
2200-
AsyncFunctionBody = 131072,
2201-
ReuseTempVariableScope = 262144,
2202-
CustomPrologue = 524288,
2203-
NoHoisting = 1048576,
2204-
HasEndOfDeclarationMarker = 2097152,
2205-
Iterator = 4194304,
2198+
InternalName = 32768,
2199+
Indented = 65536,
2200+
NoIndentation = 131072,
2201+
AsyncFunctionBody = 262144,
2202+
ReuseTempVariableScope = 524288,
2203+
CustomPrologue = 1048576,
2204+
NoHoisting = 2097152,
2205+
HasEndOfDeclarationMarker = 4194304,
2206+
Iterator = 8388608,
22062207
}
22072208
interface EmitHelper {
22082209
readonly name: string;
@@ -2271,7 +2272,7 @@ declare namespace ts {
22712272
}
22722273
}
22732274
declare namespace ts {
2274-
const version = "2.3.2";
2275+
const version = "2.3.3";
22752276
}
22762277
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
22772278
declare function clearTimeout(handle: any): void;

lib/tsserverlibrary.js

Lines changed: 273 additions & 193 deletions
Large diffs are not rendered by default.

lib/typescript.d.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,14 +2320,15 @@ declare namespace ts {
23202320
HelperName = 4096,
23212321
ExportName = 8192,
23222322
LocalName = 16384,
2323-
Indented = 32768,
2324-
NoIndentation = 65536,
2325-
AsyncFunctionBody = 131072,
2326-
ReuseTempVariableScope = 262144,
2327-
CustomPrologue = 524288,
2328-
NoHoisting = 1048576,
2329-
HasEndOfDeclarationMarker = 2097152,
2330-
Iterator = 4194304,
2323+
InternalName = 32768,
2324+
Indented = 65536,
2325+
NoIndentation = 131072,
2326+
AsyncFunctionBody = 262144,
2327+
ReuseTempVariableScope = 524288,
2328+
CustomPrologue = 1048576,
2329+
NoHoisting = 2097152,
2330+
HasEndOfDeclarationMarker = 4194304,
2331+
Iterator = 8388608,
23312332
}
23322333
interface EmitHelper {
23332334
readonly name: string;
@@ -2515,7 +2516,7 @@ declare namespace ts {
25152516
}
25162517
declare namespace ts {
25172518
/** The version of the TypeScript compiler release */
2518-
const version = "2.3.2";
2519+
const version = "2.3.3";
25192520
}
25202521
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
25212522
declare function clearTimeout(handle: any): void;

lib/typescript.js

Lines changed: 321 additions & 210 deletions
Large diffs are not rendered by default.

lib/typescriptServices.d.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,14 +2320,15 @@ declare namespace ts {
23202320
HelperName = 4096,
23212321
ExportName = 8192,
23222322
LocalName = 16384,
2323-
Indented = 32768,
2324-
NoIndentation = 65536,
2325-
AsyncFunctionBody = 131072,
2326-
ReuseTempVariableScope = 262144,
2327-
CustomPrologue = 524288,
2328-
NoHoisting = 1048576,
2329-
HasEndOfDeclarationMarker = 2097152,
2330-
Iterator = 4194304,
2323+
InternalName = 32768,
2324+
Indented = 65536,
2325+
NoIndentation = 131072,
2326+
AsyncFunctionBody = 262144,
2327+
ReuseTempVariableScope = 524288,
2328+
CustomPrologue = 1048576,
2329+
NoHoisting = 2097152,
2330+
HasEndOfDeclarationMarker = 4194304,
2331+
Iterator = 8388608,
23312332
}
23322333
interface EmitHelper {
23332334
readonly name: string;
@@ -2515,7 +2516,7 @@ declare namespace ts {
25152516
}
25162517
declare namespace ts {
25172518
/** The version of the TypeScript compiler release */
2518-
const version = "2.3.2";
2519+
const version = "2.3.3";
25192520
}
25202521
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
25212522
declare function clearTimeout(handle: any): void;

lib/typescriptServices.js

Lines changed: 321 additions & 210 deletions
Large diffs are not rendered by default.

lib/typingsInstaller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ var ts;
152152
})(ts || (ts = {}));
153153
var ts;
154154
(function (ts) {
155-
ts.version = "2.3.2";
155+
ts.version = "2.3.3";
156156
})(ts || (ts = {}));
157157
(function (ts) {
158158
ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(undefined, { usage: "sort", sensitivity: "accent" }) : undefined;

src/compiler/checker.ts

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9204,25 +9204,39 @@ namespace ts {
92049204
let result = Ternary.True;
92059205
const saveErrorInfo = errorInfo;
92069206

9207-
outer: for (const t of targetSignatures) {
9208-
// Only elaborate errors from the first failure
9209-
let shouldElaborateErrors = reportErrors;
9210-
for (const s of sourceSignatures) {
9211-
const related = signatureRelatedTo(s, t, shouldElaborateErrors);
9212-
if (related) {
9213-
result &= related;
9214-
errorInfo = saveErrorInfo;
9215-
continue outer;
9207+
if (getObjectFlags(source) & ObjectFlags.Instantiated && getObjectFlags(target) & ObjectFlags.Instantiated && source.symbol === target.symbol) {
9208+
// We instantiations of the same anonymous type (which typically will be the type of a method).
9209+
// Simply do a pairwise comparison of the signatures in the two signature lists instead of the
9210+
// much more expensive N * M comparison matrix we explore below.
9211+
for (let i = 0; i < targetSignatures.length; i++) {
9212+
const related = signatureRelatedTo(sourceSignatures[i], targetSignatures[i], reportErrors);
9213+
if (!related) {
9214+
return Ternary.False;
92169215
}
9217-
shouldElaborateErrors = false;
9216+
result &= related;
92189217
}
9218+
}
9219+
else {
9220+
outer: for (const t of targetSignatures) {
9221+
// Only elaborate errors from the first failure
9222+
let shouldElaborateErrors = reportErrors;
9223+
for (const s of sourceSignatures) {
9224+
const related = signatureRelatedTo(s, t, shouldElaborateErrors);
9225+
if (related) {
9226+
result &= related;
9227+
errorInfo = saveErrorInfo;
9228+
continue outer;
9229+
}
9230+
shouldElaborateErrors = false;
9231+
}
92199232

9220-
if (shouldElaborateErrors) {
9221-
reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1,
9222-
typeToString(source),
9223-
signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));
9233+
if (shouldElaborateErrors) {
9234+
reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1,
9235+
typeToString(source),
9236+
signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));
9237+
}
9238+
return Ternary.False;
92249239
}
9225-
return Ternary.False;
92269240
}
92279241
return result;
92289242
}

0 commit comments

Comments
 (0)