File: jsFileFunctionParametersAsOptional2.errors.txt

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 (30 lines) | stat: -rw-r--r-- 1,019 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
tests/cases/compiler/bar.ts(1,1): error TS2554: Expected 3 arguments, but got 0.
tests/cases/compiler/bar.ts(2,1): error TS2554: Expected 3 arguments, but got 1.
tests/cases/compiler/bar.ts(3,1): error TS2554: Expected 3 arguments, but got 2.


==== tests/cases/compiler/foo.js (0 errors) ====
    /**
     * @param a
     * @param b
     * @param c
     */
    function f(a, b, c) { }
    
    
==== tests/cases/compiler/bar.ts (3 errors) ====
    f(); // Error
    ~~~
!!! error TS2554: Expected 3 arguments, but got 0.
!!! related TS6210 tests/cases/compiler/foo.js:6:12: An argument for 'a' was not provided.
    f(1); // Error
    ~~~~
!!! error TS2554: Expected 3 arguments, but got 1.
!!! related TS6210 tests/cases/compiler/foo.js:6:15: An argument for 'b' was not provided.
    f(1, 2); // Error
    ~~~~~~~
!!! error TS2554: Expected 3 arguments, but got 2.
!!! related TS6210 tests/cases/compiler/foo.js:6:18: An argument for 'c' was not provided.
    
    f(1, 2, 3); // OK