Accept new baselines
This commit is contained in:
parent
83f3d2ee17
commit
436f6067ac
3 changed files with 56 additions and 0 deletions
|
@ -2,7 +2,21 @@
|
|||
declare const fn: <K extends string, V>(object: { [Key in K]: V }) => object;
|
||||
declare const a: { [index: string]: number };
|
||||
fn(a);
|
||||
|
||||
// Repro from #30218
|
||||
|
||||
declare function enumValues<K extends string, V extends string>(e: Record<K, V>): V[];
|
||||
|
||||
enum E { A = 'foo', B = 'bar' }
|
||||
|
||||
let x: E[] = enumValues(E);
|
||||
|
||||
|
||||
//// [mappedToToIndexSignatureInference.js]
|
||||
fn(a);
|
||||
var E;
|
||||
(function (E) {
|
||||
E["A"] = "foo";
|
||||
E["B"] = "bar";
|
||||
})(E || (E = {}));
|
||||
var x = enumValues(E);
|
||||
|
|
|
@ -16,3 +16,26 @@ fn(a);
|
|||
>fn : Symbol(fn, Decl(mappedToToIndexSignatureInference.ts, 0, 13))
|
||||
>a : Symbol(a, Decl(mappedToToIndexSignatureInference.ts, 1, 13))
|
||||
|
||||
// Repro from #30218
|
||||
|
||||
declare function enumValues<K extends string, V extends string>(e: Record<K, V>): V[];
|
||||
>enumValues : Symbol(enumValues, Decl(mappedToToIndexSignatureInference.ts, 2, 6))
|
||||
>K : Symbol(K, Decl(mappedToToIndexSignatureInference.ts, 6, 28))
|
||||
>V : Symbol(V, Decl(mappedToToIndexSignatureInference.ts, 6, 45))
|
||||
>e : Symbol(e, Decl(mappedToToIndexSignatureInference.ts, 6, 64))
|
||||
>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
|
||||
>K : Symbol(K, Decl(mappedToToIndexSignatureInference.ts, 6, 28))
|
||||
>V : Symbol(V, Decl(mappedToToIndexSignatureInference.ts, 6, 45))
|
||||
>V : Symbol(V, Decl(mappedToToIndexSignatureInference.ts, 6, 45))
|
||||
|
||||
enum E { A = 'foo', B = 'bar' }
|
||||
>E : Symbol(E, Decl(mappedToToIndexSignatureInference.ts, 6, 86))
|
||||
>A : Symbol(E.A, Decl(mappedToToIndexSignatureInference.ts, 8, 8))
|
||||
>B : Symbol(E.B, Decl(mappedToToIndexSignatureInference.ts, 8, 19))
|
||||
|
||||
let x: E[] = enumValues(E);
|
||||
>x : Symbol(x, Decl(mappedToToIndexSignatureInference.ts, 10, 3))
|
||||
>E : Symbol(E, Decl(mappedToToIndexSignatureInference.ts, 6, 86))
|
||||
>enumValues : Symbol(enumValues, Decl(mappedToToIndexSignatureInference.ts, 2, 6))
|
||||
>E : Symbol(E, Decl(mappedToToIndexSignatureInference.ts, 6, 86))
|
||||
|
||||
|
|
|
@ -12,3 +12,22 @@ fn(a);
|
|||
>fn : <K extends string, V>(object: { [Key in K]: V; }) => object
|
||||
>a : { [index: string]: number; }
|
||||
|
||||
// Repro from #30218
|
||||
|
||||
declare function enumValues<K extends string, V extends string>(e: Record<K, V>): V[];
|
||||
>enumValues : <K extends string, V extends string>(e: Record<K, V>) => V[]
|
||||
>e : Record<K, V>
|
||||
|
||||
enum E { A = 'foo', B = 'bar' }
|
||||
>E : E
|
||||
>A : E.A
|
||||
>'foo' : "foo"
|
||||
>B : E.B
|
||||
>'bar' : "bar"
|
||||
|
||||
let x: E[] = enumValues(E);
|
||||
>x : E[]
|
||||
>enumValues(E) : E[]
|
||||
>enumValues : <K extends string, V extends string>(e: Record<K, V>) => V[]
|
||||
>E : typeof E
|
||||
|
||||
|
|
Loading…
Reference in a new issue