File: unusedInvalidTypeArguments.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (78 lines) | stat: -rw-r--r-- 3,090 bytes parent folder | download | duplicates (4)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/call.ts(1,21): error TS2307: Cannot find module 'unknown' or its corresponding type declarations.
/callAny.ts(3,1): error TS2347: Untyped function calls may not accept type arguments.
/callAny.ts(4,1): error TS2347: Untyped function calls may not accept type arguments.
/callAny.ts(4,3): error TS2304: Cannot find name 'InvalidReference'.
/classReference.ts(4,24): error TS2315: Type 'C' is not generic.
/interface.ts(1,21): error TS2307: Cannot find module 'unknown' or its corresponding type declarations.
/new.ts(1,21): error TS2307: Cannot find module 'unkown' or its corresponding type declarations.
/super.ts(1,22): error TS2307: Cannot find module 'unknown' or its corresponding type declarations.
/super.ts(8,17): error TS2304: Cannot find name 'InvalidReference'.
/typeReference.ts(6,17): error TS2315: Type 'U' is not generic.


==== /typeReference.ts (1 errors) ====
    // Tests that types are marked as used, even if used in places that don't accept type arguments.
    
    
    type N = number;
    type U = number;
    export type Z = U<N>;
                    ~~~~
!!! error TS2315: Type 'U' is not generic.
    
==== /classReference.ts (1 errors) ====
    type N = number;
    class C { }
    // This uses getTypeFromClassOrInterfaceReference instead of getTypeFromTypeAliasReference.
    export class D extends C<N> {}
                           ~~~~
!!! error TS2315: Type 'C' is not generic.
    
==== /interface.ts (1 errors) ====
    import { Foo } from "unknown";
                        ~~~~~~~~~
!!! error TS2307: Cannot find module 'unknown' or its corresponding type declarations.
    export interface I<T> { x: Foo<T>; }
    
==== /call.ts (1 errors) ====
    import { foo } from "unknown";
                        ~~~~~~~~~
!!! error TS2307: Cannot find module 'unknown' or its corresponding type declarations.
    type T = number;
    foo<T>();
    
==== /new.ts (1 errors) ====
    import { Foo } from "unkown";
                        ~~~~~~~~
!!! error TS2307: Cannot find module 'unkown' or its corresponding type declarations.
    type T = number;
    new Foo<T>();
    
==== /callAny.ts (3 errors) ====
    declare var g: any;
    type U = number;
    g<U>();
    ~~~~~~
!!! error TS2347: Untyped function calls may not accept type arguments.
    g<InvalidReference>(); // Should get error for type argument
    ~~~~~~~~~~~~~~~~~~~~~
!!! error TS2347: Untyped function calls may not accept type arguments.
      ~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'InvalidReference'.
    
==== /super.ts (2 errors) ====
    import { A, B } from "unknown";
                         ~~~~~~~~~
!!! error TS2307: Cannot find module 'unknown' or its corresponding type declarations.
    
    type T = number;
    
    export class C extends A<B> {
        m() {
            super.m<T>(1);
            super.m<InvalidReference>(); // Should get error for type argument
                    ~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'InvalidReference'.
        }
    }