File: spliceTuples.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 (32 lines) | stat: -rw-r--r-- 1,202 bytes parent folder | download | duplicates (3)
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
tests/cases/compiler/spliceTuples.ts(23,1): error TS2322: Type '[number, string, boolean, ...boolean[]]' is not assignable to type '[number, string, boolean, boolean, ...boolean[]]'.
  Source provides no match for required element at position 3 in target.


==== tests/cases/compiler/spliceTuples.ts (1 errors) ====
    declare const sb: [string, boolean];
    
    let k1: [number, string, boolean];
    k1 = [1, ...sb];
    
    let k2: [number, string, boolean, number];
    k2 = [1, ...sb, 1];
    
    declare const sb_: [string, ...boolean[]];
    
    let k3: [number, string, ...boolean[]];
    k3 = [1, ...sb_];
    
    declare const sbb_: [string, boolean, ...boolean[]];
    
    let k4: [number, string, ...boolean[]];
    k4 = [1, ...sbb_];
    
    let k5: [number, string, boolean, ...boolean[]];
    k5 = [1, ...sbb_];
    
    let k6: [number, string, boolean, boolean, ...boolean[]];
    k6 = [1, ...sbb_];
    ~~
!!! error TS2322: Type '[number, string, boolean, ...boolean[]]' is not assignable to type '[number, string, boolean, boolean, ...boolean[]]'.
!!! error TS2322:   Source provides no match for required element at position 3 in target.