File: genericTypeReferenceWithoutTypeArgument3.js

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 (31 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (7)
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
//// [genericTypeReferenceWithoutTypeArgument3.ts]
// it is an error to use a generic type without type arguments
// all of these are errors 

declare class C<T> {
    foo: T;
}

declare var c: C;

declare var a: { x: C };
declare var b: { (x: C): C };
declare var d: { [x: C]: C };

declare function f(x: C): C;

declare class D extends C {}

declare module M {
    export class E<T> { foo: T }
}

declare class D2 extends M.C { }
declare class D3<T extends M.E> { }

declare function h<T extends C>(x: T);
declare function i<T extends M.E>(x: T);

//// [genericTypeReferenceWithoutTypeArgument3.js]
// it is an error to use a generic type without type arguments
// all of these are errors