File: noImplicitAnyFunctions.errors.txt

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (38 lines) | stat: -rw-r--r-- 1,650 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
tests/cases/compiler/noImplicitAnyFunctions.ts(1,18): error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/noImplicitAnyFunctions.ts(5,13): error TS7006: Parameter 'x' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyFunctions.ts(16,10): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/noImplicitAnyFunctions.ts(18,10): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/noImplicitAnyFunctions.ts(18,24): error TS7006: Parameter 'y' implicitly has an 'any' type.


==== tests/cases/compiler/noImplicitAnyFunctions.ts (5 errors) ====
    declare function f1();
                     ~~
!!! error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type.
    
    declare function f2(): any;
    
    function f3(x) {
                ~
!!! error TS7006: Parameter 'x' implicitly has an 'any' type.
    }
    
    function f4(x: any) {
        return x;
    }
    
    function f5(x: any): any {
        return x;
    }
    
    function f6(x: string, y: number);
             ~~
!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
    function f6(x: string, y: string): any;
    function f6(x: string, y) {
             ~~
!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
                           ~
!!! error TS7006: Parameter 'y' implicitly has an 'any' type.
        return null;
    }