File: parseTypes.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 (31 lines) | stat: -rw-r--r-- 1,571 bytes parent folder | download | duplicates (2)
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
tests/cases/compiler/parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
tests/cases/compiler/parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
tests/cases/compiler/parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'.
  Index signature is missing in type '(s: string) => void'.
tests/cases/compiler/parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'.
  Type '(s: string) => void' provides no match for the signature 'new (): number'.


==== tests/cases/compiler/parseTypes.ts (4 errors) ====
    var x = <() => number>null;
    var y = <{(): number; }>null;
    var z = <{new(): number; }>null
    var w = <{[x:number]: number; }>null
    function f() { return 3 };
    function g(s: string) { true };
    y=f;
    y=g;
    ~
!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
    x=g;
    ~
!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
    w=g;
    ~
!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'.
!!! error TS2322:   Index signature is missing in type '(s: string) => void'.
    z=g;
    ~
!!! error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'.
!!! error TS2322:   Type '(s: string) => void' provides no match for the signature 'new (): number'.