File: parseTypes.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (32 lines) | stat: -rw-r--r-- 1,576 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
32
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 '() => number'.
tests/cases/compiler/parseTypes.ts(11,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(12,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'