mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Accept new baselines
This commit is contained in:
@@ -44,6 +44,18 @@ function f4() {
|
||||
const v3 = getNumberIndexValue(o1);
|
||||
const v4 = getNumberIndexValue(o2);
|
||||
}
|
||||
|
||||
function f5() {
|
||||
enum E1 { A, B }
|
||||
enum E2 { A = "A", B = "B" }
|
||||
enum E3 { A = 0, B = "B" }
|
||||
const v1 = getStringIndexValue(E1);
|
||||
const v2 = getStringIndexValue(E2);
|
||||
const v3 = getStringIndexValue(E3);
|
||||
const v4 = getNumberIndexValue(E1);
|
||||
const v5 = getNumberIndexValue(E2);
|
||||
const v6 = getNumberIndexValue(E3);
|
||||
}
|
||||
|
||||
|
||||
//// [implicitIndexSignatures.js]
|
||||
@@ -83,3 +95,26 @@ function f4() {
|
||||
var v3 = getNumberIndexValue(o1);
|
||||
var v4 = getNumberIndexValue(o2);
|
||||
}
|
||||
function f5() {
|
||||
var E1;
|
||||
(function (E1) {
|
||||
E1[E1["A"] = 0] = "A";
|
||||
E1[E1["B"] = 1] = "B";
|
||||
})(E1 || (E1 = {}));
|
||||
var E2;
|
||||
(function (E2) {
|
||||
E2["A"] = "A";
|
||||
E2["B"] = "B";
|
||||
})(E2 || (E2 = {}));
|
||||
var E3;
|
||||
(function (E3) {
|
||||
E3[E3["A"] = 0] = "A";
|
||||
E3["B"] = "B";
|
||||
})(E3 || (E3 = {}));
|
||||
var v1 = getStringIndexValue(E1);
|
||||
var v2 = getStringIndexValue(E2);
|
||||
var v3 = getStringIndexValue(E3);
|
||||
var v4 = getNumberIndexValue(E1);
|
||||
var v5 = getNumberIndexValue(E2);
|
||||
var v6 = getNumberIndexValue(E3);
|
||||
}
|
||||
|
||||
@@ -168,3 +168,52 @@ function f4() {
|
||||
>o2 : Symbol(o2, Decl(implicitIndexSignatures.ts, 39, 7))
|
||||
}
|
||||
|
||||
function f5() {
|
||||
>f5 : Symbol(f5, Decl(implicitIndexSignatures.ts, 44, 1))
|
||||
|
||||
enum E1 { A, B }
|
||||
>E1 : Symbol(E1, Decl(implicitIndexSignatures.ts, 46, 15))
|
||||
>A : Symbol(E1.A, Decl(implicitIndexSignatures.ts, 47, 13))
|
||||
>B : Symbol(E1.B, Decl(implicitIndexSignatures.ts, 47, 16))
|
||||
|
||||
enum E2 { A = "A", B = "B" }
|
||||
>E2 : Symbol(E2, Decl(implicitIndexSignatures.ts, 47, 20))
|
||||
>A : Symbol(E2.A, Decl(implicitIndexSignatures.ts, 48, 13))
|
||||
>B : Symbol(E2.B, Decl(implicitIndexSignatures.ts, 48, 22))
|
||||
|
||||
enum E3 { A = 0, B = "B" }
|
||||
>E3 : Symbol(E3, Decl(implicitIndexSignatures.ts, 48, 32))
|
||||
>A : Symbol(E3.A, Decl(implicitIndexSignatures.ts, 49, 13))
|
||||
>B : Symbol(E3.B, Decl(implicitIndexSignatures.ts, 49, 20))
|
||||
|
||||
const v1 = getStringIndexValue(E1);
|
||||
>v1 : Symbol(v1, Decl(implicitIndexSignatures.ts, 50, 9))
|
||||
>getStringIndexValue : Symbol(getStringIndexValue, Decl(implicitIndexSignatures.ts, 11, 13))
|
||||
>E1 : Symbol(E1, Decl(implicitIndexSignatures.ts, 46, 15))
|
||||
|
||||
const v2 = getStringIndexValue(E2);
|
||||
>v2 : Symbol(v2, Decl(implicitIndexSignatures.ts, 51, 9))
|
||||
>getStringIndexValue : Symbol(getStringIndexValue, Decl(implicitIndexSignatures.ts, 11, 13))
|
||||
>E2 : Symbol(E2, Decl(implicitIndexSignatures.ts, 47, 20))
|
||||
|
||||
const v3 = getStringIndexValue(E3);
|
||||
>v3 : Symbol(v3, Decl(implicitIndexSignatures.ts, 52, 9))
|
||||
>getStringIndexValue : Symbol(getStringIndexValue, Decl(implicitIndexSignatures.ts, 11, 13))
|
||||
>E3 : Symbol(E3, Decl(implicitIndexSignatures.ts, 48, 32))
|
||||
|
||||
const v4 = getNumberIndexValue(E1);
|
||||
>v4 : Symbol(v4, Decl(implicitIndexSignatures.ts, 53, 9))
|
||||
>getNumberIndexValue : Symbol(getNumberIndexValue, Decl(implicitIndexSignatures.ts, 13, 68))
|
||||
>E1 : Symbol(E1, Decl(implicitIndexSignatures.ts, 46, 15))
|
||||
|
||||
const v5 = getNumberIndexValue(E2);
|
||||
>v5 : Symbol(v5, Decl(implicitIndexSignatures.ts, 54, 9))
|
||||
>getNumberIndexValue : Symbol(getNumberIndexValue, Decl(implicitIndexSignatures.ts, 13, 68))
|
||||
>E2 : Symbol(E2, Decl(implicitIndexSignatures.ts, 47, 20))
|
||||
|
||||
const v6 = getNumberIndexValue(E3);
|
||||
>v6 : Symbol(v6, Decl(implicitIndexSignatures.ts, 55, 9))
|
||||
>getNumberIndexValue : Symbol(getNumberIndexValue, Decl(implicitIndexSignatures.ts, 13, 68))
|
||||
>E3 : Symbol(E3, Decl(implicitIndexSignatures.ts, 48, 32))
|
||||
}
|
||||
|
||||
|
||||
@@ -196,3 +196,62 @@ function f4() {
|
||||
>o2 : { 0: string; 1: string; count: number; }
|
||||
}
|
||||
|
||||
function f5() {
|
||||
>f5 : () => void
|
||||
|
||||
enum E1 { A, B }
|
||||
>E1 : E1
|
||||
>A : E1.A
|
||||
>B : E1.B
|
||||
|
||||
enum E2 { A = "A", B = "B" }
|
||||
>E2 : E2
|
||||
>A : E2.A
|
||||
>"A" : "A"
|
||||
>B : E2.B
|
||||
>"B" : "B"
|
||||
|
||||
enum E3 { A = 0, B = "B" }
|
||||
>E3 : E3
|
||||
>A : E3.A
|
||||
>0 : 0
|
||||
>B : E3.B
|
||||
>"B" : "B"
|
||||
|
||||
const v1 = getStringIndexValue(E1);
|
||||
>v1 : string | E1
|
||||
>getStringIndexValue(E1) : string | E1
|
||||
>getStringIndexValue : <T>(map: { [x: string]: T; }) => T
|
||||
>E1 : typeof E1
|
||||
|
||||
const v2 = getStringIndexValue(E2);
|
||||
>v2 : E2
|
||||
>getStringIndexValue(E2) : E2
|
||||
>getStringIndexValue : <T>(map: { [x: string]: T; }) => T
|
||||
>E2 : typeof E2
|
||||
|
||||
const v3 = getStringIndexValue(E3);
|
||||
>v3 : string | E3.A
|
||||
>getStringIndexValue(E3) : string | E3.A
|
||||
>getStringIndexValue : <T>(map: { [x: string]: T; }) => T
|
||||
>E3 : typeof E3
|
||||
|
||||
const v4 = getNumberIndexValue(E1);
|
||||
>v4 : string
|
||||
>getNumberIndexValue(E1) : string
|
||||
>getNumberIndexValue : <T>(map: { [x: number]: T; }) => T
|
||||
>E1 : typeof E1
|
||||
|
||||
const v5 = getNumberIndexValue(E2);
|
||||
>v5 : unknown
|
||||
>getNumberIndexValue(E2) : unknown
|
||||
>getNumberIndexValue : <T>(map: { [x: number]: T; }) => T
|
||||
>E2 : typeof E2
|
||||
|
||||
const v6 = getNumberIndexValue(E3);
|
||||
>v6 : string
|
||||
>getNumberIndexValue(E3) : string
|
||||
>getNumberIndexValue : <T>(map: { [x: number]: T; }) => T
|
||||
>E3 : typeof E3
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user