mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Accept new baselines
This commit is contained in:
parent
6d6b19fd23
commit
f0e90c0d8b
@ -504,6 +504,18 @@ function updateIds2<T extends { [x: string]: string }, K extends keyof T>(
|
||||
// Repro from #13514
|
||||
|
||||
declare function head<T extends Array<any>>(list: T): T[0];
|
||||
|
||||
// Repro from #13604
|
||||
|
||||
class A<T> {
|
||||
props: T & { foo: string };
|
||||
}
|
||||
|
||||
class B extends A<{ x: number}> {
|
||||
f(p: this["props"]) {
|
||||
p.x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [keyofAndIndexedAccess.js]
|
||||
@ -834,6 +846,22 @@ function updateIds2(obj, key, stringMap) {
|
||||
var x = obj[key];
|
||||
stringMap[x]; // Should be OK.
|
||||
}
|
||||
// Repro from #13604
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
var B = (function (_super) {
|
||||
__extends(B, _super);
|
||||
function B() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
B.prototype.f = function (p) {
|
||||
p.x;
|
||||
};
|
||||
return B;
|
||||
}(A));
|
||||
|
||||
|
||||
//// [keyofAndIndexedAccess.d.ts]
|
||||
@ -1066,3 +1094,13 @@ declare function updateIds2<T extends {
|
||||
[oldId: string]: string;
|
||||
}): void;
|
||||
declare function head<T extends Array<any>>(list: T): T[0];
|
||||
declare class A<T> {
|
||||
props: T & {
|
||||
foo: string;
|
||||
};
|
||||
}
|
||||
declare class B extends A<{
|
||||
x: number;
|
||||
}> {
|
||||
f(p: this["props"]): void;
|
||||
}
|
||||
|
||||
@ -1816,3 +1816,31 @@ declare function head<T extends Array<any>>(list: T): T[0];
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 504, 22))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 504, 22))
|
||||
|
||||
// Repro from #13604
|
||||
|
||||
class A<T> {
|
||||
>A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 504, 59))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 508, 8))
|
||||
|
||||
props: T & { foo: string };
|
||||
>props : Symbol(A.props, Decl(keyofAndIndexedAccess.ts, 508, 12))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 508, 8))
|
||||
>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 509, 13))
|
||||
}
|
||||
|
||||
class B extends A<{ x: number}> {
|
||||
>B : Symbol(B, Decl(keyofAndIndexedAccess.ts, 510, 1))
|
||||
>A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 504, 59))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 512, 19))
|
||||
|
||||
f(p: this["props"]) {
|
||||
>f : Symbol(B.f, Decl(keyofAndIndexedAccess.ts, 512, 33))
|
||||
>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 513, 3))
|
||||
|
||||
p.x;
|
||||
>p.x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 512, 19))
|
||||
>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 513, 3))
|
||||
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 512, 19))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2138,3 +2138,31 @@ declare function head<T extends Array<any>>(list: T): T[0];
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
// Repro from #13604
|
||||
|
||||
class A<T> {
|
||||
>A : A<T>
|
||||
>T : T
|
||||
|
||||
props: T & { foo: string };
|
||||
>props : T & { foo: string; }
|
||||
>T : T
|
||||
>foo : string
|
||||
}
|
||||
|
||||
class B extends A<{ x: number}> {
|
||||
>B : B
|
||||
>A : A<{ x: number; }>
|
||||
>x : number
|
||||
|
||||
f(p: this["props"]) {
|
||||
>f : (p: this["props"]) => void
|
||||
>p : this["props"]
|
||||
|
||||
p.x;
|
||||
>p.x : number
|
||||
>p : this["props"]
|
||||
>x : number
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user