mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-11 16:38:46 -05:00
Accept new baselines
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//// [unionSignaturesWithThisParameter.ts]
|
||||
// Repro from #20802
|
||||
|
||||
function x<T>(ctor: {
|
||||
(this: {}, v: T): void;
|
||||
new(v: T): void;
|
||||
} | {
|
||||
(v: T): void;
|
||||
new(v: T): void;
|
||||
}, t: T) {
|
||||
new ctor(t);
|
||||
}
|
||||
|
||||
|
||||
//// [unionSignaturesWithThisParameter.js]
|
||||
"use strict";
|
||||
// Repro from #20802
|
||||
function x(ctor, t) {
|
||||
new ctor(t);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
=== tests/cases/compiler/unionSignaturesWithThisParameter.ts ===
|
||||
// Repro from #20802
|
||||
|
||||
function x<T>(ctor: {
|
||||
>x : Symbol(x, Decl(unionSignaturesWithThisParameter.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11))
|
||||
>ctor : Symbol(ctor, Decl(unionSignaturesWithThisParameter.ts, 2, 14))
|
||||
|
||||
(this: {}, v: T): void;
|
||||
>this : Symbol(this, Decl(unionSignaturesWithThisParameter.ts, 3, 5))
|
||||
>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 3, 14))
|
||||
>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11))
|
||||
|
||||
new(v: T): void;
|
||||
>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 4, 8))
|
||||
>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11))
|
||||
|
||||
} | {
|
||||
(v: T): void;
|
||||
>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 6, 5))
|
||||
>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11))
|
||||
|
||||
new(v: T): void;
|
||||
>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 7, 8))
|
||||
>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11))
|
||||
|
||||
}, t: T) {
|
||||
>t : Symbol(t, Decl(unionSignaturesWithThisParameter.ts, 8, 2))
|
||||
>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11))
|
||||
|
||||
new ctor(t);
|
||||
>ctor : Symbol(ctor, Decl(unionSignaturesWithThisParameter.ts, 2, 14))
|
||||
>t : Symbol(t, Decl(unionSignaturesWithThisParameter.ts, 8, 2))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
=== tests/cases/compiler/unionSignaturesWithThisParameter.ts ===
|
||||
// Repro from #20802
|
||||
|
||||
function x<T>(ctor: {
|
||||
>x : <T>(ctor: { (this: {}, v: T): void; new (v: T): void; } | { (v: T): void; new (v: T): void; }, t: T) => void
|
||||
>T : T
|
||||
>ctor : { (this: {}, v: T): void; new (v: T): void; } | { (v: T): void; new (v: T): void; }
|
||||
|
||||
(this: {}, v: T): void;
|
||||
>this : {}
|
||||
>v : T
|
||||
>T : T
|
||||
|
||||
new(v: T): void;
|
||||
>v : T
|
||||
>T : T
|
||||
|
||||
} | {
|
||||
(v: T): void;
|
||||
>v : T
|
||||
>T : T
|
||||
|
||||
new(v: T): void;
|
||||
>v : T
|
||||
>T : T
|
||||
|
||||
}, t: T) {
|
||||
>t : T
|
||||
>T : T
|
||||
|
||||
new ctor(t);
|
||||
>new ctor(t) : void
|
||||
>ctor : { (this: {}, v: T): void; new (v: T): void; } | { (v: T): void; new (v: T): void; }
|
||||
>t : T
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user