File: genericTypeReferenceWithoutTypeArgument3.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (61 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
=== tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts ===
// it is an error to use a generic type without type arguments
// all of these are errors 

declare class C<T> {
>C : C<T>

    foo: T;
>foo : T
}

declare var c: C;
>c : any

declare var a: { x: C };
>a : { x: any; }
>x : any

declare var b: { (x: C): C };
>b : (x: any) => any
>x : any

declare var d: { [x: C]: C };
>d : {}
>x : any

declare function f(x: C): C;
>f : (x: any) => any
>x : any

declare class D extends C {}
>D : D
>C : typeof C

declare module M {
>M : typeof M

    export class E<T> { foo: T }
>E : E<T>
>foo : T
}

declare class D2 extends M.C { }
>D2 : D2
>M.C : any
>M : typeof M
>C : any

declare class D3<T extends M.E> { }
>D3 : D3<T>
>M : any

declare function h<T extends C>(x: T);
>h : <T extends any>(x: T) => any
>x : T

declare function i<T extends M.E>(x: T);
>i : <T extends any>(x: T) => any
>M : any
>x : T