/third_party/typescript/tests/baselines/reference/ |
D | tsxTypeArgumentsJsxPreserveOutput.types | 12 function Foo<T>() { 13 >Foo : <T>() => any 20 …Foo<unknown> /> <Foo<string> /> <Foo<boolean> /> <Foo<object> /> <Foo<null> /> <Foo… 23 <Foo<unknown> /> 24 ><Foo<unknown> /> : JSX.Element 25 >Foo : <T>() => any 27 <Foo<string> /> 28 ><Foo<string> /> : JSX.Element 29 >Foo : <T>() => any 31 <Foo<boolean> /> [all …]
|
D | tsxTypeArgumentsJsxPreserveOutput.js | 7 function Foo<T>() { 13 <Foo<unknown> /> 14 <Foo<string> /> 15 <Foo<boolean> /> 16 <Foo<object> /> 17 <Foo<null> /> 18 <Foo<any> /> 19 <Foo<never> /> 20 <Foo<undefined> /> 21 <Foo<TypeProps> /> [all …]
|
D | tsxTypeArgumentsJsxPreserveOutput.symbols | 13 function Foo<T>() { 14 >Foo : Symbol(Foo, Decl(foo.tsx, 3, 43)) 22 <Foo<unknown> /> 23 >Foo : Symbol(Foo, Decl(foo.tsx, 3, 43)) 25 <Foo<string> /> 26 >Foo : Symbol(Foo, Decl(foo.tsx, 3, 43)) 28 <Foo<boolean> /> 29 >Foo : Symbol(Foo, Decl(foo.tsx, 3, 43)) 31 <Foo<object> /> 32 >Foo : Symbol(Foo, Decl(foo.tsx, 3, 43)) [all …]
|
D | constEnumToStringWithComments.types | 2 const enum Foo { 3 >Foo : Foo 6 >X : Foo.X 10 >Y : Foo.Y 14 >Z : Foo.Z 18 >A : Foo.A 23 >B : Foo.B 28 >C : Foo.A 33 let x0 = Foo.X.toString(); 35 >Foo.X.toString() : string [all …]
|
D | constEnumToStringNoComments.types | 2 const enum Foo { 3 >Foo : Foo 6 >X : Foo.X 10 >Y : Foo.Y 14 >Z : Foo.Z 18 >A : Foo.A 23 >B : Foo.B 28 >C : Foo.A 33 let x0 = Foo.X.toString(); 35 >Foo.X.toString() : string [all …]
|
D | enumLiteralAssignableToEnumInsideUnion.types | 5 export enum Foo { 6 >Foo : Foo 9 >A : Foo.A 10 >B : Foo.B 16 export enum Foo { 17 >Foo : Foo 20 >A : Foo.A 21 >B : Foo.B 27 export enum Foo { 28 >Foo : Foo [all …]
|
D | classBlockScoping.types | 6 let Foo: any; 7 >Foo : any 12 Foo = class Foo { 13 >Foo = class Foo { static y = new Foo(); static x() { new Foo(); } m() {… 14 >Foo : any 15 >class Foo { static y = new Foo(); static x() { new Foo(); } m() { … 16 >Foo : typeof Foo 18 static y = new Foo(); 19 >y : Foo 20 >new Foo() : Foo [all …]
|
D | subtypesOfTypeParameterWithRecursiveConstraints.types | 4 class Foo<T> { foo: T; } 5 >Foo : Foo<T> 8 function f<T extends Foo<U>, U extends Foo<T>, V extends Foo<V>>(t: T, u: U, v: V) { 9 >f : <T extends Foo<U>, U extends Foo<T>, V extends Foo<V>>(t: T, u: U, v: V) => void 60 var r4 = true ? t : new Foo<T>(); 61 >r4 : T | Foo<T> 62 >true ? t : new Foo<T>() : T | Foo<T> 65 >new Foo<T>() : Foo<T> 66 >Foo : typeof Foo 68 var r4 = true ? new Foo<T>() : t; [all …]
|
D | enumLiteralAssignableToEnumInsideUnion.js | 3 export enum Foo { 8 export enum Foo { 13 export enum Foo { 19 export enum Foo { 24 const e0: X.Foo | boolean = Y.Foo.A; // ok 25 const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed 26 const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal 27 const e3: X.Foo.B | boolean = Z.Foo.A; // not legal 28 const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is… 29 const e5: Ka.Foo | boolean = Z.Foo.A; // ok [all …]
|
D | enumLiteralAssignableToEnumInsideUnion.symbols | 5 export enum Foo { 6 >Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) 9 >A : Symbol(Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 1, 21)) 10 >B : Symbol(Foo.B, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 2, 10)) 16 export enum Foo { 17 >Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 5, 10)) 20 >A : Symbol(Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 6, 21)) 21 >B : Symbol(Foo.B, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 7, 10)) 27 export enum Foo { 28 >Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) [all …]
|
D | declarationEmitClassMemberWithComputedPropertyName.types | 22 class Foo { 23 >Foo : Foo 90 export const t1 = Foo[k1]; 92 >Foo[k1] : () => number 93 >Foo : typeof Foo 96 export const t2 = new Foo()[k1]; 98 >new Foo()[k1] : () => string 99 >new Foo() : Foo 100 >Foo : typeof Foo 103 export const t3 = Foo[k2]; [all …]
|
D | subtypesOfTypeParameterWithRecursiveConstraints.js | 4 class Foo<T> { foo: T; } class 5 function f<T extends Foo<U>, U extends Foo<T>, V extends Foo<V>>(t: T, u: U, v: V) { 19 var r4 = true ? t : new Foo<T>(); 20 var r4 = true ? new Foo<T>() : t; 23 var r5 = true ? u : new Foo<T>(); 24 var r5 = true ? new Foo<T>() : u; 27 var r6 = true ? v : new Foo<T>(); 28 var r6 = true ? new Foo<T>() : v; 32 var r7 = true ? t : new Foo<U>(); 33 var r7 = true ? new Foo<U>() : t; [all …]
|
D | classStaticBlock27.types | 4 void class Foo { 5 …Foo { static prop = 1 static { console.log(Foo.prop); Foo.prop++; } stat… 6 …Foo { static prop = 1 static { console.log(Foo.prop); Foo.prop++; } stat… 7 >Foo : typeof Foo 14 console.log(Foo.prop); 15 >console.log(Foo.prop) : void 19 >Foo.prop : number 20 >Foo : typeof Foo 23 Foo.prop++; 24 >Foo.prop++ : number [all …]
|
D | constAssertionOnEnum.types | 2 export enum Foo { 3 >Foo : Foo 6 >A : Foo.A 9 >B : Foo.B 13 import {Foo} from './enum'; 14 >Foo : typeof Foo 25 let foo = Foo.A as const; 26 >foo : Foo.A 27 >Foo.A as const : Foo.A 28 >Foo.A : Foo.A [all …]
|
D | subtypesOfTypeParameterWithConstraints4.types | 4 class Foo { foo: number; } 5 >Foo : Foo 8 function f<T extends Foo, U extends Foo, V>(t: T, u: U, v: V) { 9 >f : <T extends Foo, U extends Foo, V>(t: T, u: U, v: V) => void 60 var r4 = true ? t : new Foo(); 61 >r4 : Foo 62 >true ? t : new Foo() : Foo 65 >new Foo() : Foo 66 >Foo : typeof Foo 68 var r4 = true ? new Foo() : t; [all …]
|
D | errorForUsingPropertyOfTypeAsType01.errors.txt | 1 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 2 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 3 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 4 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 5 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 6 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 7 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 8 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… 9 tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(40,12): error TS2702: 'Foo' only refers… 10 …not access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the ty… [all …]
|
D | constEnumToStringNoComments.symbols | 2 const enum Foo { 3 >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) 6 >X : Symbol(Foo.X, Decl(constEnumToStringNoComments.ts, 0, 16)) 9 >Y : Symbol(Foo.Y, Decl(constEnumToStringNoComments.ts, 1, 12)) 12 >Z : Symbol(Foo.Z, Decl(constEnumToStringNoComments.ts, 2, 12)) 15 >A : Symbol(Foo.A, Decl(constEnumToStringNoComments.ts, 3, 11)) 18 >B : Symbol(Foo.B, Decl(constEnumToStringNoComments.ts, 4, 11)) 21 >C : Symbol(Foo.C, Decl(constEnumToStringNoComments.ts, 5, 13)) 24 let x0 = Foo.X.toString(); 26 >Foo.X.toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) [all …]
|
D | constEnumToStringWithComments.symbols | 2 const enum Foo { 3 >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) 6 >X : Symbol(Foo.X, Decl(constEnumToStringWithComments.ts, 0, 16)) 9 >Y : Symbol(Foo.Y, Decl(constEnumToStringWithComments.ts, 1, 12)) 12 >Z : Symbol(Foo.Z, Decl(constEnumToStringWithComments.ts, 2, 12)) 15 >A : Symbol(Foo.A, Decl(constEnumToStringWithComments.ts, 3, 11)) 18 >B : Symbol(Foo.B, Decl(constEnumToStringWithComments.ts, 4, 11)) 21 >C : Symbol(Foo.C, Decl(constEnumToStringWithComments.ts, 5, 13)) 24 let x0 = Foo.X.toString(); 26 >Foo.X.toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) [all …]
|
D | classBlockScoping.symbols | 6 let Foo: any; 7 >Foo : Symbol(Foo, Decl(classBlockScoping.ts, 1, 5)) 12 Foo = class Foo { 13 >Foo : Symbol(Foo, Decl(classBlockScoping.ts, 1, 5)) 14 >Foo : Symbol(Foo, Decl(classBlockScoping.ts, 3, 9)) 16 static y = new Foo(); 17 >y : Symbol(Foo.y, Decl(classBlockScoping.ts, 3, 21)) 18 >Foo : Symbol(Foo, Decl(classBlockScoping.ts, 3, 9)) 21 >x : Symbol(Foo.x, Decl(classBlockScoping.ts, 4, 27)) 23 new Foo(); [all …]
|
D | errorForUsingPropertyOfTypeAsType01.symbols | 5 export interface Foo { 6 >Foo : Symbol(Foo, Decl(errorForUsingPropertyOfTypeAsType01.ts, 0, 17)) 9 >bar : Symbol(Foo.bar, Decl(errorForUsingPropertyOfTypeAsType01.ts, 1, 26)) 12 var x: Foo.bar = ""; 14 >Foo : Symbol(Foo) 15 >bar : Symbol(Foo.bar) 17 var y: Test1.Foo.bar = ""; 20 >Foo : Symbol(Test1.Foo) 21 >bar : Symbol(Test1.Foo.bar) 27 export class Foo { [all …]
|
D | errorForUsingPropertyOfTypeAsType01.types | 5 export interface Foo { 10 var x: Foo.bar = ""; 11 >x : Foo.bar 12 >Foo : any 15 var y: Test1.Foo.bar = ""; 16 >y : Test1.Foo.bar 18 >Foo : any 25 export class Foo { 26 >Foo : Foo 32 var x: Foo.bar = ""; [all …]
|
D | constAssertionOnEnum.js | 4 export enum Foo { 10 import {Foo} from './enum'; 16 let foo = Foo.A as const; 21 export enum Foo { X } 22 ns.Foo.X as const; 26 export enum Foo { X } 27 (Foo).X as const; 31 export var Foo; variable 32 (function (Foo) { argument 33 Foo[Foo["A"] = 0] = "A"; [all …]
|
D | decoratedBlockScopedClass3.types | 15 class Foo { 16 >Foo : Foo 18 public static func(): Foo { 19 >func : () => Foo 21 return new Foo(); 22 >new Foo() : Foo 23 >Foo : typeof Foo 26 Foo.func(); 27 >Foo.func() : Foo 28 >Foo.func : () => Foo [all …]
|
D | classBlockScoping.js | 3 let Foo: any; 5 Foo = class Foo { class 6 static y = new Foo(); 9 new Foo(); 13 new Foo(); 17 new Foo(); 20 class Foo { 21 static y = new Foo(); 24 new Foo(); 28 new Foo(); [all …]
|
/third_party/typescript/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/ |
D | subtypesOfTypeParameterWithRecursiveConstraints.ts | 3 class Foo<T> { foo: T; } class 4 function f<T extends Foo<U>, U extends Foo<T>, V extends Foo<V>>(t: T, u: U, v: V) { 18 var r4 = true ? t : new Foo<T>(); 19 var r4 = true ? new Foo<T>() : t; 22 var r5 = true ? u : new Foo<T>(); 23 var r5 = true ? new Foo<T>() : u; 26 var r6 = true ? v : new Foo<T>(); 27 var r6 = true ? new Foo<T>() : v; 31 var r7 = true ? t : new Foo<U>(); 32 var r7 = true ? new Foo<U>() : t; [all …]
|