File: implicitAnyDeclareTypePropertyWithoutType.types

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 (47 lines) | stat: -rw-r--r-- 938 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
=== tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts ===
class C {
>C : C

    constructor() { }
}

// this should be an error
var x: { y; z; }             // error at "y,z"
>x : { y: any; z: any; }
>y : any
>z : any

var x1: { y1: C; z1; };      // error at "z1" 
>x1 : { y1: C; z1: any; }
>y1 : C
>z1 : any

var x11: { new (); };        // error at "new"
>x11 : new () => any

var x2: (y2) => number;      // error at "y2"
>x2 : (y2: any) => number
>y2 : any

var x3: (x3: string, y3) => void ; // error at "y3"
>x3 : (x3: string, y3: any) => void
>x3 : string
>y3 : any

// this should not be an error
var bar: { a: number; b: number };
>bar : { a: number; b: number; }
>a : number
>b : number

var foo: { littleC: C; c: string };
>foo : { littleC: C; c: string; }
>littleC : C
>c : string

var x4: new () => any;
>x4 : new () => any

var x5: () => any;
>x5 : () => any