/third_party/typescript/tests/cases/conformance/types/objectTypeLiteral/callSignatures/ |
H A D | callSignaturesWithOptionalParameters2.ts | 3 function foo(x?: number);
4 function foo(x?: number) { }
6 foo(1);
7 foo();
9 function foo2(x: number);
10 function foo2(x: number, y?: number);
11 function foo2(x: number, y?: number) { }
13 foo2(1);
14 foo2(1, 2);
17 foo( [all...] |
H A D | callSignaturesWithParameterInitializers.ts | 3 function foo(x = 1) { }
4 var f = function foo(x = 1) { }
7 foo(1);
8 foo();
15 foo(x = 1) { }
19 c.foo();
20 c.foo(1);
25 foo(x: number, y = 1);
31 i.foo(1);
32 i.foo( [all...] |
H A D | callSignaturesWithParameterInitializers2.ts | 4 function foo(x = 2);
5 function foo(x = 1) { }
7 foo(1);
8 foo();
11 foo(x = 2);
12 foo(x = 1) { }
16 c.foo();
17 c.foo(1);
20 foo(x = 1), // error
21 foo( [all...] |
H A D | parametersWithNoAnnotationAreAny.ts | 1 function foo(x) { return x; }
2 var f = function foo(x) { return x; }
7 foo(x) {
13 foo(x);
14 foo2(x, y);
18 foo(x);
22 foo(x) {
25 a: function foo(x) {
|
H A D | restParameterWithoutAnnotationIsAnyArray.ts | 3 function foo(...x) { }
4 var f = function foo(...x) { }
8 foo(...x) { }
13 foo(...x, ...y);
18 foo(...x);
22 foo(...x) { },
23 a: function foo(...x, ...y) { },
|
H A D | restParametersOfNonArrayTypes.ts | 3 function foo(...x: string) { }
4 var f = function foo(...x: number) { }
8 foo(...x: C) { }
13 foo(...x: number, ...y: number);
18 foo(...x: string);
22 foo(...x: string) { },
23 a: function foo(...x: number, ...y: Date) { },
|
H A D | restParametersOfNonArrayTypes2.ts | 7 function foo(...x: MyThing) { }
8 var f = function foo(...x: MyThing) { }
12 foo(...x: MyThing) { }
17 foo(...x: MyThing, ...y: MyThing);
22 foo(...x: MyThing);
26 foo(...x: MyThing) { },
27 a: function foo(...x: MyThing, ...y: MyThing) { },
34 function foo2(...x: MyThing2<string>) { }
35 var f3 = function foo(...x: MyThing2<string>) { }
39 foo( [all...] |
H A D | restParametersWithArrayTypeAnnotations.ts | 3 function foo(...x: number[]) { }
4 var f = function foo(...x: number[]) { }
8 foo(...x: number[]) { }
13 foo(...x: number[], ...y: number[]);
18 foo(...x: number[]);
22 foo(...x: number[]) { },
23 a: function foo(...x: number[], ...y: number[]) { },
30 function foo2(...x: Array<string>) { }
31 var f3 = function foo(...x: Array<string>) { }
35 foo( [all...] |
H A D | specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts | 3 function foo(x: 'a');
4 function foo(x: number) { }
7 foo(x: 'a');
8 foo(x: number);
9 foo(x: any) { }
13 foo(x: 'a');
14 foo(x: T);
15 foo(x: any) { }
19 foo(x: 'a');
20 foo( [all...] |
H A D | specializedSignatureIsSubtypeOfNonSpecializedSignature.ts | 4 function foo(x: 'a');
5 function foo(x: string);
6 function foo(x: any) { }
9 foo(x: 'a');
10 foo(x: string);
11 foo(x: any) { }
15 foo(x: 'a');
16 foo(x: string);
17 foo(x: T);
18 foo( [all...] |
H A D | stringLiteralTypesInImplementationSignatures.ts | 3 function foo(x: 'hi') { }
4 var f = function foo(x: 'hi') { }
8 foo(x: 'hi') { }
13 foo(x: 'hi', y: 'hi');
18 foo(x: 'hi');
22 foo(x: 'hi') { },
23 a: function foo(x: 'hi', y: 'hi') { },
|
H A D | stringLiteralTypesInImplementationSignatures2.ts | 3 function foo(x: any);
4 function foo(x: 'hi') { }
7 foo(x: string);
8 foo(x: 'hi') { }
14 foo(x: 'a', y: 'a');
15 foo(x: 'hi', y: 'hi');
21 foo(x: 'hi');
22 foo(x: 'a');
26 foo(x: 'hi') { },
27 foo( [all...] |
H A D | typeParameterAsTypeArgument.ts | 3 function foo<T, U>(x: T, y: U) {
4 foo<U, U>(y, y);
16 //function foo<T, U extends T>(x: T, y: U) {
17 // foo<U, U>(y, y);
|
H A D | typeParameterUsedAsTypeParameterConstraint.ts | 3 function foo<T, U extends T>(x: T, y: U): T {
8 function foo2<U extends T, T>(x: T, y: U): T {
|
H A D | typeParameterUsedAsTypeParameterConstraint2.ts | 4 function foo<T, U extends T>(x: T, y: U) {
13 function foo2<U extends T, T>(x: T, y: U) {
|
H A D | typeParameterUsedAsTypeParameterConstraint3.ts | 8 // foo<W extends V>(x: W): T {
18 // foo<W extends V>(x: W): T {
28 foo<W extends V>(x: W): T;
35 foo<W extends V>(x: W): T;
42 // foo<W extends V>(x: W): T;
49 // foo<W extends V>(x: W): T;
|
H A D | typeParameterUsedAsTypeParameterConstraint4.ts | 6 foo<W extends V>(x: W): T {
16 foo<W extends V>(x: W): T;
19 function foo<T, U extends T>(x: T, y: U): V { // error
28 function foo2<U extends T, T>(x: T, y: U): W { // error
|
/third_party/typescript/tests/cases/conformance/types/objectTypeLiteral/indexSignatures/ |
H A D | numericIndexerConstrainsPropertyDeclarations.ts | 4 foo: number;
28 foo() {
35 static foo() { } // ok
53 foo(): string; // ok
71 foo(): string; // ok
94 foo() {
|
H A D | numericIndexerConstrainsPropertyDeclarations2.ts | 4 foo(): string { return ''; }
11 class Foo {
20 interface Foo2 {
|
H A D | stringIndexerConstrainsPropertyDeclarations.ts | 4 foo: number;
28 foo() { // error
35 static foo() { } // ok
53 foo(): string; // error
71 foo(): string; // error
94 foo() {
|
H A D | stringIndexerConstrainsPropertyDeclarations2.ts | 4 foo(): string { return ''; }
11 class Foo {
19 interface Foo2 {
|
/third_party/typescript/tests/cases/conformance/types/objectTypeLiteral/ |
H A D | objectTypeLiteralSyntax.ts | 2 foo: string;
7 foo: string;
|
H A D | objectTypeLiteralSyntax2.ts | 2 foo: string,
8 foo: string
12 var z: { foo: string bar: string
|
/third_party/typescript/tests/cases/conformance/types/objectTypeLiteral/propertySignatures/ |
H A D | propertyNameWithoutTypeAnnotation.ts | 2 foo;
6 foo;
10 foo;
14 foo: null
18 var r1 = (new C()).foo;
19 var r2 = (<I>null).foo;
20 var r3 = a.foo;
21 var r4 = b.foo
|
/third_party/typescript/tests/cases/conformance/types/primitives/boolean/ |
H A D | invalidBooleanAssignments.ts | 11 class C { foo: string }
|