File: implicitAnyAmbients.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 (56 lines) | stat: -rw-r--r-- 2,787 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
tests/cases/compiler/implicitAnyAmbients.ts(2,9): error TS7005: Variable 'x' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyAmbients.ts(5,14): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyAmbients.ts(5,16): error TS7006: Parameter 'x' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyAmbients.ts(6,14): error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyAmbients.ts(10,9): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyAmbients.ts(11,9): error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyAmbients.ts(16,9): error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyAmbients.ts(17,9): error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyAmbients.ts(22,13): error TS7005: Variable 'y' implicitly has an 'any' type.


==== tests/cases/compiler/implicitAnyAmbients.ts (9 errors) ====
    declare module m {
        var x; // error
            ~
!!! error TS7005: Variable 'x' implicitly has an 'any' type.
        var y: any;
    
        function f(x); // error 
                 ~
!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type.
                   ~
!!! error TS7006: Parameter 'x' implicitly has an 'any' type.
        function f2(x: any); // error
                 ~~
!!! error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type.
        function f3(x: any): any;
    
        interface I {
            foo(); // error
            ~~~~~~
!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type.
            foo2(x: any); // error
            ~~~~~~~~~~~~~
!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type.
            foo3(x: any): any;
        }
    
        class C {
            foo(); // error
            ~~~
!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type.
            foo2(x: any); // error
            ~~~~
!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type.
            foo3(x: any): any;
        }
    
        module n {
            var y; // error
                ~
!!! error TS7005: Variable 'y' implicitly has an 'any' type.
        }
    
        import m2 = n;
    }