File: emitDefaultParametersFunctionProperty.types

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,241 bytes parent folder | download | duplicates (7)
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/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts ===
var obj2 = {
>obj2 : { func1(y?: number, ...rest: any[]): void; func2(x?: string): void; func3(x: string, z: number, y?: string): void; func4(x: string, z: number, y?: string, ...rest: any[]): void; }
>{    func1(y = 10, ...rest) { },    func2(x = "hello") { },    func3(x: string, z: number, y = "hello") { },    func4(x: string, z: number, y = "hello", ...rest) { },} : { func1(y?: number, ...rest: any[]): void; func2(x?: string): void; func3(x: string, z: number, y?: string): void; func4(x: string, z: number, y?: string, ...rest: any[]): void; }

    func1(y = 10, ...rest) { },
>func1 : (y?: number, ...rest: any[]) => void
>y : number
>10 : 10
>rest : any[]

    func2(x = "hello") { },
>func2 : (x?: string) => void
>x : string
>"hello" : "hello"

    func3(x: string, z: number, y = "hello") { },
>func3 : (x: string, z: number, y?: string) => void
>x : string
>z : number
>y : string
>"hello" : "hello"

    func4(x: string, z: number, y = "hello", ...rest) { },
>func4 : (x: string, z: number, y?: string, ...rest: any[]) => void
>x : string
>z : number
>y : string
>"hello" : "hello"
>rest : any[]
}