mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-22 16:52:14 -06:00
Update baselines
This commit is contained in:
parent
fb3168d46f
commit
1b45a05f7e
@ -31,10 +31,10 @@ class C {
|
||||
>s : Symbol(s, Decl(computedPropertyNames12_ES5.ts, 0, 3))
|
||||
|
||||
static [""]: number;
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames12_ES5.ts, 8, 19))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames12_ES5.ts, 8, 19))
|
||||
|
||||
[0]: number;
|
||||
>0 : Symbol(C[[0]], Decl(computedPropertyNames12_ES5.ts, 9, 24))
|
||||
>0 : Symbol(C[0], Decl(computedPropertyNames12_ES5.ts, 9, 24))
|
||||
|
||||
[a]: number;
|
||||
>a : Symbol(a, Decl(computedPropertyNames12_ES5.ts, 2, 3))
|
||||
|
||||
@ -31,10 +31,10 @@ class C {
|
||||
>s : Symbol(s, Decl(computedPropertyNames12_ES6.ts, 0, 3))
|
||||
|
||||
static [""]: number;
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames12_ES6.ts, 8, 19))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames12_ES6.ts, 8, 19))
|
||||
|
||||
[0]: number;
|
||||
>0 : Symbol(C[[0]], Decl(computedPropertyNames12_ES6.ts, 9, 24))
|
||||
>0 : Symbol(C[0], Decl(computedPropertyNames12_ES6.ts, 9, 24))
|
||||
|
||||
[a]: number;
|
||||
>a : Symbol(a, Decl(computedPropertyNames12_ES6.ts, 2, 3))
|
||||
|
||||
@ -17,11 +17,11 @@ class C {
|
||||
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames36_ES5.ts, 4, 22))
|
||||
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames36_ES5.ts, 4, 22))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames36_ES5.ts, 0, 0))
|
||||
|
||||
set ["set1"](p: Foo2) { }
|
||||
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames36_ES5.ts, 7, 37))
|
||||
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames36_ES5.ts, 7, 37))
|
||||
>p : Symbol(p, Decl(computedPropertyNames36_ES5.ts, 8, 17))
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames36_ES5.ts, 0, 15))
|
||||
}
|
||||
|
||||
@ -17,11 +17,11 @@ class C {
|
||||
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames36_ES6.ts, 4, 22))
|
||||
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames36_ES6.ts, 4, 22))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames36_ES6.ts, 0, 0))
|
||||
|
||||
set ["set1"](p: Foo2) { }
|
||||
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames36_ES6.ts, 7, 37))
|
||||
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames36_ES6.ts, 7, 37))
|
||||
>p : Symbol(p, Decl(computedPropertyNames36_ES6.ts, 8, 17))
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames36_ES6.ts, 0, 15))
|
||||
}
|
||||
|
||||
@ -17,10 +17,10 @@ class C {
|
||||
|
||||
// Computed properties
|
||||
[""]() { return new Foo }
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames40_ES5.ts, 0, 0))
|
||||
|
||||
[""]() { return new Foo2 }
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames40_ES5.ts, 0, 15))
|
||||
}
|
||||
|
||||
@ -17,10 +17,10 @@ class C {
|
||||
|
||||
// Computed properties
|
||||
[""]() { return new Foo }
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames40_ES6.ts, 0, 0))
|
||||
|
||||
[""]() { return new Foo2 }
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames40_ES6.ts, 0, 15))
|
||||
}
|
||||
|
||||
@ -17,6 +17,6 @@ class C {
|
||||
|
||||
// Computed properties
|
||||
[""]: Foo;
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames42_ES5.ts, 4, 22))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames42_ES5.ts, 4, 22))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames42_ES5.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -17,6 +17,6 @@ class C {
|
||||
|
||||
// Computed properties
|
||||
[""]: Foo;
|
||||
>"" : Symbol(C[[""]], Decl(computedPropertyNames42_ES6.ts, 4, 22))
|
||||
>"" : Symbol(C[""], Decl(computedPropertyNames42_ES6.ts, 4, 22))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames42_ES6.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -22,11 +22,11 @@ class D extends C {
|
||||
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(D[["get1"]], Decl(computedPropertyNames43_ES5.ts, 7, 19))
|
||||
>"get1" : Symbol(D["get1"], Decl(computedPropertyNames43_ES5.ts, 7, 19))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames43_ES5.ts, 0, 0))
|
||||
|
||||
set ["set1"](p: Foo2) { }
|
||||
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames43_ES5.ts, 9, 37))
|
||||
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames43_ES5.ts, 9, 37))
|
||||
>p : Symbol(p, Decl(computedPropertyNames43_ES5.ts, 10, 17))
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames43_ES5.ts, 0, 15))
|
||||
}
|
||||
|
||||
@ -22,11 +22,11 @@ class D extends C {
|
||||
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(D[["get1"]], Decl(computedPropertyNames43_ES6.ts, 7, 19))
|
||||
>"get1" : Symbol(D["get1"], Decl(computedPropertyNames43_ES6.ts, 7, 19))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames43_ES6.ts, 0, 0))
|
||||
|
||||
set ["set1"](p: Foo2) { }
|
||||
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames43_ES6.ts, 9, 37))
|
||||
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames43_ES6.ts, 9, 37))
|
||||
>p : Symbol(p, Decl(computedPropertyNames43_ES6.ts, 10, 17))
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames43_ES6.ts, 0, 15))
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ class C {
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames44_ES5.ts, 0, 15))
|
||||
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames44_ES5.ts, 4, 22))
|
||||
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames44_ES5.ts, 4, 22))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES5.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ class D extends C {
|
||||
>C : Symbol(C, Decl(computedPropertyNames44_ES5.ts, 1, 19))
|
||||
|
||||
set ["set1"](p: Foo) { }
|
||||
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames44_ES5.ts, 8, 19))
|
||||
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames44_ES5.ts, 8, 19))
|
||||
>p : Symbol(p, Decl(computedPropertyNames44_ES5.ts, 9, 17))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES5.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ class C {
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames44_ES6.ts, 0, 15))
|
||||
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames44_ES6.ts, 4, 22))
|
||||
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames44_ES6.ts, 4, 22))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES6.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ class D extends C {
|
||||
>C : Symbol(C, Decl(computedPropertyNames44_ES6.ts, 1, 19))
|
||||
|
||||
set ["set1"](p: Foo) { }
|
||||
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames44_ES6.ts, 8, 19))
|
||||
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames44_ES6.ts, 8, 19))
|
||||
>p : Symbol(p, Decl(computedPropertyNames44_ES6.ts, 9, 17))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES6.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ class C {
|
||||
>C : Symbol(C, Decl(computedPropertyNames45_ES5.ts, 1, 19))
|
||||
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames45_ES5.ts, 3, 9))
|
||||
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames45_ES5.ts, 3, 9))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES5.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ class D extends C {
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames45_ES5.ts, 0, 15))
|
||||
|
||||
set ["set1"](p: Foo) { }
|
||||
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames45_ES5.ts, 9, 22))
|
||||
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames45_ES5.ts, 9, 22))
|
||||
>p : Symbol(p, Decl(computedPropertyNames45_ES5.ts, 10, 17))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES5.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ class C {
|
||||
>C : Symbol(C, Decl(computedPropertyNames45_ES6.ts, 1, 19))
|
||||
|
||||
get ["get1"]() { return new Foo }
|
||||
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames45_ES6.ts, 3, 9))
|
||||
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames45_ES6.ts, 3, 9))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES6.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ class D extends C {
|
||||
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames45_ES6.ts, 0, 15))
|
||||
|
||||
set ["set1"](p: Foo) { }
|
||||
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames45_ES6.ts, 9, 22))
|
||||
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames45_ES6.ts, 9, 22))
|
||||
>p : Symbol(p, Decl(computedPropertyNames45_ES6.ts, 10, 17))
|
||||
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES6.ts, 0, 0))
|
||||
}
|
||||
|
||||
@ -15,5 +15,5 @@ class C {
|
||||
|
||||
@dec ["method"]() {}
|
||||
>dec : Symbol(dec, Decl(decoratorOnClassMethod6.ts, 0, 0))
|
||||
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod6.ts, 2, 9))
|
||||
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod6.ts, 2, 9))
|
||||
}
|
||||
|
||||
@ -3,9 +3,9 @@ class C {
|
||||
>C : Symbol(C, Decl(duplicateIdentifierComputedName.ts, 0, 0))
|
||||
|
||||
["a"]: string;
|
||||
>"a" : Symbol(C[["a"]], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
|
||||
>"a" : Symbol(C["a"], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
|
||||
|
||||
["a"]: string;
|
||||
>"a" : Symbol(C[["a"]], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
|
||||
>"a" : Symbol(C["a"], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
|
||||
}
|
||||
|
||||
|
||||
62
tests/baselines/reference/dynamicNamesErrors.symbols
Normal file
62
tests/baselines/reference/dynamicNamesErrors.symbols
Normal file
@ -0,0 +1,62 @@
|
||||
=== tests/cases/compiler/dynamicNamesErrors.ts ===
|
||||
const c0 = "1";
|
||||
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
|
||||
|
||||
const c1 = 1;
|
||||
>c1 : Symbol(c1, Decl(dynamicNamesErrors.ts, 1, 5))
|
||||
|
||||
interface T0 {
|
||||
>T0 : Symbol(T0, Decl(dynamicNamesErrors.ts, 1, 13))
|
||||
|
||||
[c0]: number;
|
||||
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
|
||||
|
||||
1: number;
|
||||
}
|
||||
|
||||
interface T1 {
|
||||
>T1 : Symbol(T1, Decl(dynamicNamesErrors.ts, 6, 1))
|
||||
|
||||
[c0]: number;
|
||||
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
|
||||
}
|
||||
|
||||
interface T2 {
|
||||
>T2 : Symbol(T2, Decl(dynamicNamesErrors.ts, 10, 1))
|
||||
|
||||
[c0]: string;
|
||||
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
|
||||
}
|
||||
|
||||
interface T3 {
|
||||
>T3 : Symbol(T3, Decl(dynamicNamesErrors.ts, 14, 1))
|
||||
|
||||
[c0]: number;
|
||||
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
|
||||
|
||||
[c1]: string;
|
||||
>c1 : Symbol(c1, Decl(dynamicNamesErrors.ts, 1, 5))
|
||||
}
|
||||
|
||||
let t1: T1;
|
||||
>t1 : Symbol(t1, Decl(dynamicNamesErrors.ts, 21, 3))
|
||||
>T1 : Symbol(T1, Decl(dynamicNamesErrors.ts, 6, 1))
|
||||
|
||||
let t2: T2;
|
||||
>t2 : Symbol(t2, Decl(dynamicNamesErrors.ts, 22, 3))
|
||||
>T2 : Symbol(T2, Decl(dynamicNamesErrors.ts, 10, 1))
|
||||
|
||||
t1 = t2;
|
||||
>t1 : Symbol(t1, Decl(dynamicNamesErrors.ts, 21, 3))
|
||||
>t2 : Symbol(t2, Decl(dynamicNamesErrors.ts, 22, 3))
|
||||
|
||||
t2 = t1;
|
||||
>t2 : Symbol(t2, Decl(dynamicNamesErrors.ts, 22, 3))
|
||||
>t1 : Symbol(t1, Decl(dynamicNamesErrors.ts, 21, 3))
|
||||
|
||||
export interface T4 {
|
||||
>T4 : Symbol(T4, Decl(dynamicNamesErrors.ts, 24, 8))
|
||||
|
||||
[c0]: number;
|
||||
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
|
||||
}
|
||||
66
tests/baselines/reference/dynamicNamesErrors.types
Normal file
66
tests/baselines/reference/dynamicNamesErrors.types
Normal file
@ -0,0 +1,66 @@
|
||||
=== tests/cases/compiler/dynamicNamesErrors.ts ===
|
||||
const c0 = "1";
|
||||
>c0 : "1"
|
||||
>"1" : "1"
|
||||
|
||||
const c1 = 1;
|
||||
>c1 : 1
|
||||
>1 : 1
|
||||
|
||||
interface T0 {
|
||||
>T0 : T0
|
||||
|
||||
[c0]: number;
|
||||
>c0 : "1"
|
||||
|
||||
1: number;
|
||||
}
|
||||
|
||||
interface T1 {
|
||||
>T1 : T1
|
||||
|
||||
[c0]: number;
|
||||
>c0 : "1"
|
||||
}
|
||||
|
||||
interface T2 {
|
||||
>T2 : T2
|
||||
|
||||
[c0]: string;
|
||||
>c0 : "1"
|
||||
}
|
||||
|
||||
interface T3 {
|
||||
>T3 : T3
|
||||
|
||||
[c0]: number;
|
||||
>c0 : "1"
|
||||
|
||||
[c1]: string;
|
||||
>c1 : 1
|
||||
}
|
||||
|
||||
let t1: T1;
|
||||
>t1 : T1
|
||||
>T1 : T1
|
||||
|
||||
let t2: T2;
|
||||
>t2 : T2
|
||||
>T2 : T2
|
||||
|
||||
t1 = t2;
|
||||
>t1 = t2 : T2
|
||||
>t1 : T1
|
||||
>t2 : T2
|
||||
|
||||
t2 = t1;
|
||||
>t2 = t1 : T1
|
||||
>t2 : T2
|
||||
>t1 : T1
|
||||
|
||||
export interface T4 {
|
||||
>T4 : T4
|
||||
|
||||
[c0]: number;
|
||||
>c0 : "1"
|
||||
}
|
||||
@ -39,11 +39,11 @@ interface A {
|
||||
|
||||
1:number;
|
||||
[2]:number;
|
||||
>2 : Symbol(A[[2]], Decl(literalsInComputedProperties1.ts, 12, 13))
|
||||
>2 : Symbol(A[2], Decl(literalsInComputedProperties1.ts, 12, 13))
|
||||
|
||||
"3":number;
|
||||
["4"]:number;
|
||||
>"4" : Symbol(A[["4"]], Decl(literalsInComputedProperties1.ts, 14, 15))
|
||||
>"4" : Symbol(A["4"], Decl(literalsInComputedProperties1.ts, 14, 15))
|
||||
}
|
||||
|
||||
let y:A;
|
||||
@ -59,7 +59,7 @@ y[1].toExponential();
|
||||
y[2].toExponential();
|
||||
>y[2].toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
>y : Symbol(y, Decl(literalsInComputedProperties1.ts, 18, 3))
|
||||
>2 : Symbol(A[[2]], Decl(literalsInComputedProperties1.ts, 12, 13))
|
||||
>2 : Symbol(A[2], Decl(literalsInComputedProperties1.ts, 12, 13))
|
||||
>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
|
||||
y[3].toExponential();
|
||||
@ -71,7 +71,7 @@ y[3].toExponential();
|
||||
y[4].toExponential();
|
||||
>y[4].toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
>y : Symbol(y, Decl(literalsInComputedProperties1.ts, 18, 3))
|
||||
>4 : Symbol(A[["4"]], Decl(literalsInComputedProperties1.ts, 14, 15))
|
||||
>4 : Symbol(A["4"], Decl(literalsInComputedProperties1.ts, 14, 15))
|
||||
>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
|
||||
class C {
|
||||
@ -79,11 +79,11 @@ class C {
|
||||
|
||||
1:number;
|
||||
[2]:number;
|
||||
>2 : Symbol(C[[2]], Decl(literalsInComputedProperties1.ts, 25, 13))
|
||||
>2 : Symbol(C[2], Decl(literalsInComputedProperties1.ts, 25, 13))
|
||||
|
||||
"3":number;
|
||||
["4"]:number;
|
||||
>"4" : Symbol(C[["4"]], Decl(literalsInComputedProperties1.ts, 27, 15))
|
||||
>"4" : Symbol(C["4"], Decl(literalsInComputedProperties1.ts, 27, 15))
|
||||
}
|
||||
|
||||
let z:C;
|
||||
@ -99,7 +99,7 @@ z[1].toExponential();
|
||||
z[2].toExponential();
|
||||
>z[2].toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
>z : Symbol(z, Decl(literalsInComputedProperties1.ts, 31, 3))
|
||||
>2 : Symbol(C[[2]], Decl(literalsInComputedProperties1.ts, 25, 13))
|
||||
>2 : Symbol(C[2], Decl(literalsInComputedProperties1.ts, 25, 13))
|
||||
>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
|
||||
z[3].toExponential();
|
||||
@ -111,7 +111,7 @@ z[3].toExponential();
|
||||
z[4].toExponential();
|
||||
>z[4].toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
>z : Symbol(z, Decl(literalsInComputedProperties1.ts, 31, 3))
|
||||
>4 : Symbol(C[["4"]], Decl(literalsInComputedProperties1.ts, 27, 15))
|
||||
>4 : Symbol(C["4"], Decl(literalsInComputedProperties1.ts, 27, 15))
|
||||
>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --))
|
||||
|
||||
enum X {
|
||||
@ -119,15 +119,15 @@ enum X {
|
||||
|
||||
1 = 1,
|
||||
[2] = 2,
|
||||
>2 : Symbol(X[[2]], Decl(literalsInComputedProperties1.ts, 38, 10))
|
||||
>2 : Symbol(X[2], Decl(literalsInComputedProperties1.ts, 38, 10))
|
||||
|
||||
"3" = 3,
|
||||
["4"] = 4,
|
||||
>"4" : Symbol(X[["4"]], Decl(literalsInComputedProperties1.ts, 40, 12))
|
||||
>"4" : Symbol(X["4"], Decl(literalsInComputedProperties1.ts, 40, 12))
|
||||
|
||||
"foo" = 5,
|
||||
["bar"] = 6
|
||||
>"bar" : Symbol(X[["bar"]], Decl(literalsInComputedProperties1.ts, 42, 14))
|
||||
>"bar" : Symbol(X["bar"], Decl(literalsInComputedProperties1.ts, 42, 14))
|
||||
}
|
||||
|
||||
let a = X["foo"];
|
||||
@ -138,6 +138,6 @@ let a = X["foo"];
|
||||
let a0 = X["bar"];
|
||||
>a0 : Symbol(a0, Decl(literalsInComputedProperties1.ts, 47, 3))
|
||||
>X : Symbol(X, Decl(literalsInComputedProperties1.ts, 35, 21))
|
||||
>"bar" : Symbol(X[["bar"]], Decl(literalsInComputedProperties1.ts, 42, 14))
|
||||
>"bar" : Symbol(X["bar"], Decl(literalsInComputedProperties1.ts, 42, 14))
|
||||
|
||||
// TODO: make sure that enum still disallow template literals as member names
|
||||
|
||||
235
tests/baselines/reference/uniqueSymbolsErrors.symbols
Normal file
235
tests/baselines/reference/uniqueSymbolsErrors.symbols
Normal file
@ -0,0 +1,235 @@
|
||||
=== tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsErrors.ts ===
|
||||
// declarations
|
||||
declare const {}: symbol();
|
||||
declare let invalidLetType: symbol();
|
||||
>invalidLetType : Symbol(invalidLetType, Decl(uniqueSymbolsErrors.ts, 2, 11))
|
||||
|
||||
declare var invalidVarType: symbol();
|
||||
>invalidVarType : Symbol(invalidVarType, Decl(uniqueSymbolsErrors.ts, 3, 11))
|
||||
|
||||
// function arguments and return types
|
||||
declare function invalidArgType(arg: symbol()): void;
|
||||
>invalidArgType : Symbol(invalidArgType, Decl(uniqueSymbolsErrors.ts, 3, 37))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 6, 32))
|
||||
|
||||
declare function invalidRestArgType(...arg: symbol()[]): void;
|
||||
>invalidRestArgType : Symbol(invalidRestArgType, Decl(uniqueSymbolsErrors.ts, 6, 53))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 7, 36))
|
||||
|
||||
declare function invalidReturnType(): symbol();
|
||||
>invalidReturnType : Symbol(invalidReturnType, Decl(uniqueSymbolsErrors.ts, 7, 62))
|
||||
|
||||
declare function invalidThisType(this: symbol()): void;
|
||||
>invalidThisType : Symbol(invalidThisType, Decl(uniqueSymbolsErrors.ts, 8, 47))
|
||||
>this : Symbol(this, Decl(uniqueSymbolsErrors.ts, 9, 33))
|
||||
|
||||
declare function invalidTypePredicate(n: any): n is symbol();
|
||||
>invalidTypePredicate : Symbol(invalidTypePredicate, Decl(uniqueSymbolsErrors.ts, 9, 55))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 10, 38))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 10, 38))
|
||||
|
||||
declare function invalidTypeParameterConstraint<T extends symbol()>(): void;
|
||||
>invalidTypeParameterConstraint : Symbol(invalidTypeParameterConstraint, Decl(uniqueSymbolsErrors.ts, 10, 61))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 11, 48))
|
||||
|
||||
declare function invalidTypeParameterDefault<T = symbol()>(): void;
|
||||
>invalidTypeParameterDefault : Symbol(invalidTypeParameterDefault, Decl(uniqueSymbolsErrors.ts, 11, 76))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 12, 45))
|
||||
|
||||
// classes
|
||||
class InvalidClass {
|
||||
>InvalidClass : Symbol(InvalidClass, Decl(uniqueSymbolsErrors.ts, 12, 67))
|
||||
|
||||
constructor(invalidConstructorArgType: symbol()) {}
|
||||
>invalidConstructorArgType : Symbol(invalidConstructorArgType, Decl(uniqueSymbolsErrors.ts, 16, 16))
|
||||
|
||||
readonly invalidReadonlyPropertyType: symbol();
|
||||
>invalidReadonlyPropertyType : Symbol(InvalidClass.invalidReadonlyPropertyType, Decl(uniqueSymbolsErrors.ts, 16, 55))
|
||||
|
||||
invalidPropertyType: symbol();
|
||||
>invalidPropertyType : Symbol(InvalidClass.invalidPropertyType, Decl(uniqueSymbolsErrors.ts, 18, 51))
|
||||
|
||||
invalidArgType(arg: symbol()): void { return; }
|
||||
>invalidArgType : Symbol(InvalidClass.invalidArgType, Decl(uniqueSymbolsErrors.ts, 19, 34))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 20, 19))
|
||||
|
||||
invalidRestArgType(...args: symbol()[]): void { return; }
|
||||
>invalidRestArgType : Symbol(InvalidClass.invalidRestArgType, Decl(uniqueSymbolsErrors.ts, 20, 51))
|
||||
>args : Symbol(args, Decl(uniqueSymbolsErrors.ts, 21, 23))
|
||||
|
||||
invalidReturnType(): symbol() { return; }
|
||||
>invalidReturnType : Symbol(InvalidClass.invalidReturnType, Decl(uniqueSymbolsErrors.ts, 21, 61))
|
||||
|
||||
invalidThisType(this: symbol()): void { return; }
|
||||
>invalidThisType : Symbol(InvalidClass.invalidThisType, Decl(uniqueSymbolsErrors.ts, 22, 45))
|
||||
>this : Symbol(this, Decl(uniqueSymbolsErrors.ts, 23, 20))
|
||||
|
||||
invalidTypePredicate(n: any): n is symbol() { return; }
|
||||
>invalidTypePredicate : Symbol(InvalidClass.invalidTypePredicate, Decl(uniqueSymbolsErrors.ts, 23, 53))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 24, 25))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 24, 25))
|
||||
|
||||
invalidTypeParameterConstraint<T extends symbol()>(): void { return; }
|
||||
>invalidTypeParameterConstraint : Symbol(InvalidClass.invalidTypeParameterConstraint, Decl(uniqueSymbolsErrors.ts, 24, 59))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 25, 35))
|
||||
|
||||
invalidTypeParameterDefault<T = symbol()>(): void { return; }
|
||||
>invalidTypeParameterDefault : Symbol(InvalidClass.invalidTypeParameterDefault, Decl(uniqueSymbolsErrors.ts, 25, 74))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 26, 32))
|
||||
|
||||
get invalidGetter(): symbol() { return; }
|
||||
>invalidGetter : Symbol(InvalidClass.invalidGetter, Decl(uniqueSymbolsErrors.ts, 26, 65))
|
||||
|
||||
set invalidSetter(arg: symbol()) { return; }
|
||||
>invalidSetter : Symbol(InvalidClass.invalidSetter, Decl(uniqueSymbolsErrors.ts, 27, 45))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 28, 22))
|
||||
|
||||
static invalidStaticPropertyType: symbol();
|
||||
>invalidStaticPropertyType : Symbol(InvalidClass.invalidStaticPropertyType, Decl(uniqueSymbolsErrors.ts, 28, 48))
|
||||
|
||||
static invalidStaticArgType(arg: symbol()): void { return; }
|
||||
>invalidStaticArgType : Symbol(InvalidClass.invalidStaticArgType, Decl(uniqueSymbolsErrors.ts, 30, 47))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 31, 32))
|
||||
|
||||
static invalidStaticRestArgType(...args: symbol()[]): void { return; }
|
||||
>invalidStaticRestArgType : Symbol(InvalidClass.invalidStaticRestArgType, Decl(uniqueSymbolsErrors.ts, 31, 64))
|
||||
>args : Symbol(args, Decl(uniqueSymbolsErrors.ts, 32, 36))
|
||||
|
||||
static invalidStaticReturnType(): symbol() { return; }
|
||||
>invalidStaticReturnType : Symbol(InvalidClass.invalidStaticReturnType, Decl(uniqueSymbolsErrors.ts, 32, 74))
|
||||
|
||||
static invalidStaticThisType(this: symbol()): void { return; }
|
||||
>invalidStaticThisType : Symbol(InvalidClass.invalidStaticThisType, Decl(uniqueSymbolsErrors.ts, 33, 58))
|
||||
>this : Symbol(this, Decl(uniqueSymbolsErrors.ts, 34, 33))
|
||||
|
||||
static invalidStaticTypePredicate(n: any): n is symbol() { return; }
|
||||
>invalidStaticTypePredicate : Symbol(InvalidClass.invalidStaticTypePredicate, Decl(uniqueSymbolsErrors.ts, 34, 66))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 35, 38))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 35, 38))
|
||||
|
||||
static invalidStaticTypeParameterConstraint<T extends symbol()>(): void { return; }
|
||||
>invalidStaticTypeParameterConstraint : Symbol(InvalidClass.invalidStaticTypeParameterConstraint, Decl(uniqueSymbolsErrors.ts, 35, 72))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 36, 48))
|
||||
|
||||
static invalidStaticTypeParameterDefault<T = symbol()>(): void { return; }
|
||||
>invalidStaticTypeParameterDefault : Symbol(InvalidClass.invalidStaticTypeParameterDefault, Decl(uniqueSymbolsErrors.ts, 36, 87))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 37, 45))
|
||||
|
||||
static get invalidStaticGetter(): symbol() { return; }
|
||||
>invalidStaticGetter : Symbol(InvalidClass.invalidStaticGetter, Decl(uniqueSymbolsErrors.ts, 37, 78))
|
||||
|
||||
static set invalidStaticSetter(arg: symbol()) { return; }
|
||||
>invalidStaticSetter : Symbol(InvalidClass.invalidStaticSetter, Decl(uniqueSymbolsErrors.ts, 38, 58))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 39, 35))
|
||||
}
|
||||
|
||||
// interfaces
|
||||
interface InvalidInterface {
|
||||
>InvalidInterface : Symbol(InvalidInterface, Decl(uniqueSymbolsErrors.ts, 40, 1))
|
||||
|
||||
invalidPropertyType: symbol();
|
||||
>invalidPropertyType : Symbol(InvalidInterface.invalidPropertyType, Decl(uniqueSymbolsErrors.ts, 43, 28))
|
||||
|
||||
invalidArgType(arg: symbol()): void;
|
||||
>invalidArgType : Symbol(InvalidInterface.invalidArgType, Decl(uniqueSymbolsErrors.ts, 44, 34))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 45, 19))
|
||||
|
||||
invalidRestArgType(...args: symbol()[]): void;
|
||||
>invalidRestArgType : Symbol(InvalidInterface.invalidRestArgType, Decl(uniqueSymbolsErrors.ts, 45, 40))
|
||||
>args : Symbol(args, Decl(uniqueSymbolsErrors.ts, 46, 23))
|
||||
|
||||
invalidReturnType(): symbol();
|
||||
>invalidReturnType : Symbol(InvalidInterface.invalidReturnType, Decl(uniqueSymbolsErrors.ts, 46, 50))
|
||||
|
||||
invalidThisType(this: symbol());
|
||||
>invalidThisType : Symbol(InvalidInterface.invalidThisType, Decl(uniqueSymbolsErrors.ts, 47, 34))
|
||||
>this : Symbol(this, Decl(uniqueSymbolsErrors.ts, 48, 20))
|
||||
|
||||
invalidTypePredicate(n: any): n is symbol()
|
||||
>invalidTypePredicate : Symbol(InvalidInterface.invalidTypePredicate, Decl(uniqueSymbolsErrors.ts, 48, 36))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 49, 25))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 49, 25))
|
||||
|
||||
invalidTypeParameterConstraint<T extends symbol()>(): void;
|
||||
>invalidTypeParameterConstraint : Symbol(InvalidInterface.invalidTypeParameterConstraint, Decl(uniqueSymbolsErrors.ts, 49, 47))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 50, 35))
|
||||
|
||||
invalidTypeParameterDefault<T = symbol()>(): void;
|
||||
>invalidTypeParameterDefault : Symbol(InvalidInterface.invalidTypeParameterDefault, Decl(uniqueSymbolsErrors.ts, 50, 63))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 51, 32))
|
||||
}
|
||||
|
||||
// type literals
|
||||
type InvalidTypeLiteral = {
|
||||
>InvalidTypeLiteral : Symbol(InvalidTypeLiteral, Decl(uniqueSymbolsErrors.ts, 52, 1))
|
||||
|
||||
invalidPropertyType: symbol();
|
||||
>invalidPropertyType : Symbol(invalidPropertyType, Decl(uniqueSymbolsErrors.ts, 55, 27))
|
||||
|
||||
invalidArgType(arg: symbol()): void;
|
||||
>invalidArgType : Symbol(invalidArgType, Decl(uniqueSymbolsErrors.ts, 56, 34))
|
||||
>arg : Symbol(arg, Decl(uniqueSymbolsErrors.ts, 57, 19))
|
||||
|
||||
invalidRestArgType(...args: symbol()[]): void;
|
||||
>invalidRestArgType : Symbol(invalidRestArgType, Decl(uniqueSymbolsErrors.ts, 57, 40))
|
||||
>args : Symbol(args, Decl(uniqueSymbolsErrors.ts, 58, 23))
|
||||
|
||||
invalidReturnType(): symbol();
|
||||
>invalidReturnType : Symbol(invalidReturnType, Decl(uniqueSymbolsErrors.ts, 58, 50))
|
||||
|
||||
invalidThisType(this: symbol());
|
||||
>invalidThisType : Symbol(invalidThisType, Decl(uniqueSymbolsErrors.ts, 59, 34))
|
||||
>this : Symbol(this, Decl(uniqueSymbolsErrors.ts, 60, 20))
|
||||
|
||||
invalidTypePredicate(n: any): n is symbol()
|
||||
>invalidTypePredicate : Symbol(invalidTypePredicate, Decl(uniqueSymbolsErrors.ts, 60, 36))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 61, 25))
|
||||
>n : Symbol(n, Decl(uniqueSymbolsErrors.ts, 61, 25))
|
||||
|
||||
invalidTypeParameterConstraint<T extends symbol()>(): void;
|
||||
>invalidTypeParameterConstraint : Symbol(invalidTypeParameterConstraint, Decl(uniqueSymbolsErrors.ts, 61, 47))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 62, 35))
|
||||
|
||||
invalidTypeParameterDefault<T = symbol()>(): void;
|
||||
>invalidTypeParameterDefault : Symbol(invalidTypeParameterDefault, Decl(uniqueSymbolsErrors.ts, 62, 63))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 63, 32))
|
||||
|
||||
};
|
||||
|
||||
// type alias
|
||||
type InvalidAlias = symbol();
|
||||
>InvalidAlias : Symbol(InvalidAlias, Decl(uniqueSymbolsErrors.ts, 64, 2))
|
||||
|
||||
type InvalidAliasTypeParameterConstraint<T extends symbol()> = never;
|
||||
>InvalidAliasTypeParameterConstraint : Symbol(InvalidAliasTypeParameterConstraint, Decl(uniqueSymbolsErrors.ts, 67, 29))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 68, 41))
|
||||
|
||||
type InvalidAliasTypeParameterDefault<T extends symbol()> = never;
|
||||
>InvalidAliasTypeParameterDefault : Symbol(InvalidAliasTypeParameterDefault, Decl(uniqueSymbolsErrors.ts, 68, 69))
|
||||
>T : Symbol(T, Decl(uniqueSymbolsErrors.ts, 69, 38))
|
||||
|
||||
// type references
|
||||
declare const invalidTypeArgument: Promise<symbol()>;
|
||||
>invalidTypeArgument : Symbol(invalidTypeArgument, Decl(uniqueSymbolsErrors.ts, 72, 13))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
|
||||
declare const invalidArrayType: symbol()[];
|
||||
>invalidArrayType : Symbol(invalidArrayType, Decl(uniqueSymbolsErrors.ts, 73, 13))
|
||||
|
||||
declare const invalidTupleType: [symbol()];
|
||||
>invalidTupleType : Symbol(invalidTupleType, Decl(uniqueSymbolsErrors.ts, 74, 13))
|
||||
|
||||
// mapped types
|
||||
declare const invalidMappedType: { [P in string]: symbol() };
|
||||
>invalidMappedType : Symbol(invalidMappedType, Decl(uniqueSymbolsErrors.ts, 77, 13))
|
||||
>P : Symbol(P, Decl(uniqueSymbolsErrors.ts, 77, 36))
|
||||
|
||||
// unions/intersection
|
||||
declare const invalidUnion: symbol() | symbol();
|
||||
>invalidUnion : Symbol(invalidUnion, Decl(uniqueSymbolsErrors.ts, 80, 13))
|
||||
|
||||
declare const invalidIntersection: symbol() | symbol();
|
||||
>invalidIntersection : Symbol(invalidIntersection, Decl(uniqueSymbolsErrors.ts, 81, 13))
|
||||
|
||||
|
||||
|
||||
235
tests/baselines/reference/uniqueSymbolsErrors.types
Normal file
235
tests/baselines/reference/uniqueSymbolsErrors.types
Normal file
@ -0,0 +1,235 @@
|
||||
=== tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsErrors.ts ===
|
||||
// declarations
|
||||
declare const {}: symbol();
|
||||
declare let invalidLetType: symbol();
|
||||
>invalidLetType : symbol
|
||||
|
||||
declare var invalidVarType: symbol();
|
||||
>invalidVarType : symbol
|
||||
|
||||
// function arguments and return types
|
||||
declare function invalidArgType(arg: symbol()): void;
|
||||
>invalidArgType : (arg: symbol) => void
|
||||
>arg : symbol
|
||||
|
||||
declare function invalidRestArgType(...arg: symbol()[]): void;
|
||||
>invalidRestArgType : (...arg: symbol[]) => void
|
||||
>arg : symbol[]
|
||||
|
||||
declare function invalidReturnType(): symbol();
|
||||
>invalidReturnType : () => symbol
|
||||
|
||||
declare function invalidThisType(this: symbol()): void;
|
||||
>invalidThisType : (this: symbol) => void
|
||||
>this : symbol
|
||||
|
||||
declare function invalidTypePredicate(n: any): n is symbol();
|
||||
>invalidTypePredicate : (n: any) => n is symbol
|
||||
>n : any
|
||||
>n : any
|
||||
|
||||
declare function invalidTypeParameterConstraint<T extends symbol()>(): void;
|
||||
>invalidTypeParameterConstraint : <T extends symbol>() => void
|
||||
>T : T
|
||||
|
||||
declare function invalidTypeParameterDefault<T = symbol()>(): void;
|
||||
>invalidTypeParameterDefault : <T = symbol>() => void
|
||||
>T : T
|
||||
|
||||
// classes
|
||||
class InvalidClass {
|
||||
>InvalidClass : InvalidClass
|
||||
|
||||
constructor(invalidConstructorArgType: symbol()) {}
|
||||
>invalidConstructorArgType : symbol
|
||||
|
||||
readonly invalidReadonlyPropertyType: symbol();
|
||||
>invalidReadonlyPropertyType : symbol
|
||||
|
||||
invalidPropertyType: symbol();
|
||||
>invalidPropertyType : symbol
|
||||
|
||||
invalidArgType(arg: symbol()): void { return; }
|
||||
>invalidArgType : (arg: symbol) => void
|
||||
>arg : symbol
|
||||
|
||||
invalidRestArgType(...args: symbol()[]): void { return; }
|
||||
>invalidRestArgType : (...args: symbol[]) => void
|
||||
>args : symbol[]
|
||||
|
||||
invalidReturnType(): symbol() { return; }
|
||||
>invalidReturnType : () => symbol
|
||||
|
||||
invalidThisType(this: symbol()): void { return; }
|
||||
>invalidThisType : (this: symbol) => void
|
||||
>this : symbol
|
||||
|
||||
invalidTypePredicate(n: any): n is symbol() { return; }
|
||||
>invalidTypePredicate : (n: any) => n is symbol
|
||||
>n : any
|
||||
>n : any
|
||||
|
||||
invalidTypeParameterConstraint<T extends symbol()>(): void { return; }
|
||||
>invalidTypeParameterConstraint : <T extends symbol>() => void
|
||||
>T : T
|
||||
|
||||
invalidTypeParameterDefault<T = symbol()>(): void { return; }
|
||||
>invalidTypeParameterDefault : <T = symbol>() => void
|
||||
>T : T
|
||||
|
||||
get invalidGetter(): symbol() { return; }
|
||||
>invalidGetter : symbol
|
||||
|
||||
set invalidSetter(arg: symbol()) { return; }
|
||||
>invalidSetter : symbol
|
||||
>arg : symbol
|
||||
|
||||
static invalidStaticPropertyType: symbol();
|
||||
>invalidStaticPropertyType : symbol
|
||||
|
||||
static invalidStaticArgType(arg: symbol()): void { return; }
|
||||
>invalidStaticArgType : (arg: symbol) => void
|
||||
>arg : symbol
|
||||
|
||||
static invalidStaticRestArgType(...args: symbol()[]): void { return; }
|
||||
>invalidStaticRestArgType : (...args: symbol[]) => void
|
||||
>args : symbol[]
|
||||
|
||||
static invalidStaticReturnType(): symbol() { return; }
|
||||
>invalidStaticReturnType : () => symbol
|
||||
|
||||
static invalidStaticThisType(this: symbol()): void { return; }
|
||||
>invalidStaticThisType : (this: symbol) => void
|
||||
>this : symbol
|
||||
|
||||
static invalidStaticTypePredicate(n: any): n is symbol() { return; }
|
||||
>invalidStaticTypePredicate : (n: any) => n is symbol
|
||||
>n : any
|
||||
>n : any
|
||||
|
||||
static invalidStaticTypeParameterConstraint<T extends symbol()>(): void { return; }
|
||||
>invalidStaticTypeParameterConstraint : <T extends symbol>() => void
|
||||
>T : T
|
||||
|
||||
static invalidStaticTypeParameterDefault<T = symbol()>(): void { return; }
|
||||
>invalidStaticTypeParameterDefault : <T = symbol>() => void
|
||||
>T : T
|
||||
|
||||
static get invalidStaticGetter(): symbol() { return; }
|
||||
>invalidStaticGetter : symbol
|
||||
|
||||
static set invalidStaticSetter(arg: symbol()) { return; }
|
||||
>invalidStaticSetter : symbol
|
||||
>arg : symbol
|
||||
}
|
||||
|
||||
// interfaces
|
||||
interface InvalidInterface {
|
||||
>InvalidInterface : InvalidInterface
|
||||
|
||||
invalidPropertyType: symbol();
|
||||
>invalidPropertyType : symbol
|
||||
|
||||
invalidArgType(arg: symbol()): void;
|
||||
>invalidArgType : (arg: symbol) => void
|
||||
>arg : symbol
|
||||
|
||||
invalidRestArgType(...args: symbol()[]): void;
|
||||
>invalidRestArgType : (...args: symbol[]) => void
|
||||
>args : symbol[]
|
||||
|
||||
invalidReturnType(): symbol();
|
||||
>invalidReturnType : () => symbol
|
||||
|
||||
invalidThisType(this: symbol());
|
||||
>invalidThisType : (this: symbol) => any
|
||||
>this : symbol
|
||||
|
||||
invalidTypePredicate(n: any): n is symbol()
|
||||
>invalidTypePredicate : (n: any) => n is symbol
|
||||
>n : any
|
||||
>n : any
|
||||
|
||||
invalidTypeParameterConstraint<T extends symbol()>(): void;
|
||||
>invalidTypeParameterConstraint : <T extends symbol>() => void
|
||||
>T : T
|
||||
|
||||
invalidTypeParameterDefault<T = symbol()>(): void;
|
||||
>invalidTypeParameterDefault : <T = symbol>() => void
|
||||
>T : T
|
||||
}
|
||||
|
||||
// type literals
|
||||
type InvalidTypeLiteral = {
|
||||
>InvalidTypeLiteral : InvalidTypeLiteral
|
||||
|
||||
invalidPropertyType: symbol();
|
||||
>invalidPropertyType : symbol
|
||||
|
||||
invalidArgType(arg: symbol()): void;
|
||||
>invalidArgType : (arg: symbol) => void
|
||||
>arg : symbol
|
||||
|
||||
invalidRestArgType(...args: symbol()[]): void;
|
||||
>invalidRestArgType : (...args: symbol[]) => void
|
||||
>args : symbol[]
|
||||
|
||||
invalidReturnType(): symbol();
|
||||
>invalidReturnType : () => symbol
|
||||
|
||||
invalidThisType(this: symbol());
|
||||
>invalidThisType : (this: symbol) => any
|
||||
>this : symbol
|
||||
|
||||
invalidTypePredicate(n: any): n is symbol()
|
||||
>invalidTypePredicate : (n: any) => n is symbol
|
||||
>n : any
|
||||
>n : any
|
||||
|
||||
invalidTypeParameterConstraint<T extends symbol()>(): void;
|
||||
>invalidTypeParameterConstraint : <T extends symbol>() => void
|
||||
>T : T
|
||||
|
||||
invalidTypeParameterDefault<T = symbol()>(): void;
|
||||
>invalidTypeParameterDefault : <T = symbol>() => void
|
||||
>T : T
|
||||
|
||||
};
|
||||
|
||||
// type alias
|
||||
type InvalidAlias = symbol();
|
||||
>InvalidAlias : symbol
|
||||
|
||||
type InvalidAliasTypeParameterConstraint<T extends symbol()> = never;
|
||||
>InvalidAliasTypeParameterConstraint : never
|
||||
>T : T
|
||||
|
||||
type InvalidAliasTypeParameterDefault<T extends symbol()> = never;
|
||||
>InvalidAliasTypeParameterDefault : never
|
||||
>T : T
|
||||
|
||||
// type references
|
||||
declare const invalidTypeArgument: Promise<symbol()>;
|
||||
>invalidTypeArgument : Promise<symbol>
|
||||
>Promise : Promise<T>
|
||||
|
||||
declare const invalidArrayType: symbol()[];
|
||||
>invalidArrayType : symbol[]
|
||||
|
||||
declare const invalidTupleType: [symbol()];
|
||||
>invalidTupleType : [symbol]
|
||||
|
||||
// mapped types
|
||||
declare const invalidMappedType: { [P in string]: symbol() };
|
||||
>invalidMappedType : { [x: string]: symbol; }
|
||||
>P : P
|
||||
|
||||
// unions/intersection
|
||||
declare const invalidUnion: symbol() | symbol();
|
||||
>invalidUnion : symbol
|
||||
|
||||
declare const invalidIntersection: symbol() | symbol();
|
||||
>invalidIntersection : symbol
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user