File: callWithMissingVoidUndefinedUnknownAnyInJs%28strict%3Dfalse%29.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 (66 lines) | stat: -rw-r--r-- 2,885 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
tests/cases/conformance/expressions/functionCalls/tsfile.ts(6,1): error TS2554: Expected 1 arguments, but got 0.
tests/cases/conformance/expressions/functionCalls/tsfile.ts(7,1): error TS2554: Expected 1 arguments, but got 0.
tests/cases/conformance/expressions/functionCalls/tsfile.ts(8,1): error TS2554: Expected 1 arguments, but got 0.
tests/cases/conformance/expressions/functionCalls/tsfile.ts(10,4): error TS2554: Expected 1 arguments, but got 0.
tests/cases/conformance/expressions/functionCalls/tsfile.ts(11,4): error TS2554: Expected 1 arguments, but got 0.
tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: Expected 1 arguments, but got 0.


==== tests/cases/conformance/expressions/functionCalls/defs.d.ts (0 errors) ====
    declare function f1(p: void): void;
    declare function f2(p: undefined): void;
    declare function f3(p: unknown): void;
    declare function f4(p: any): void;
    
    interface I<T> { m(p: T): void; }
    declare const o1: I<void>;
    declare const o2: I<undefined>;
    declare const o3: I<unknown>;
    declare const o4: I<any>;
    
==== tests/cases/conformance/expressions/functionCalls/jsfile.js (0 errors) ====
    // current behavior: treat trailing `void` as optional
    f1();
    o1.m();
    
    // new behavior: treat 'undefined', 'unknown', and 'any' as optional in non-strict mode
    f2();
    f3();
    f4();
    
    o2.m();
    o3.m();
    o4.m();
    
==== tests/cases/conformance/expressions/functionCalls/tsfile.ts (6 errors) ====
    // current behavior: treat trailing `void` as optional
    f1();
    o1.m();
    
    // no change in behavior
    f2();
    ~~~~
!!! error TS2554: Expected 1 arguments, but got 0.
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:2:21: An argument for 'p' was not provided.
    f3();
    ~~~~
!!! error TS2554: Expected 1 arguments, but got 0.
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:3:21: An argument for 'p' was not provided.
    f4();
    ~~~~
!!! error TS2554: Expected 1 arguments, but got 0.
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:4:21: An argument for 'p' was not provided.
    
    o2.m();
       ~~~
!!! error TS2554: Expected 1 arguments, but got 0.
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided.
    o3.m();
       ~~~
!!! error TS2554: Expected 1 arguments, but got 0.
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided.
    o4.m();
       ~~~
!!! error TS2554: Expected 1 arguments, but got 0.
!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided.