39 lines
933 B
Text
39 lines
933 B
Text
|
=== tests/cases/compiler/sourceMapValidationFunctions.ts ===
|
||
|
var greetings = 0;
|
||
|
>greetings : number
|
||
|
|
||
|
function greet(greeting: string): number {
|
||
|
>greet : (greeting: string) => number
|
||
|
>greeting : string
|
||
|
|
||
|
greetings++;
|
||
|
>greetings++ : number
|
||
|
>greetings : number
|
||
|
|
||
|
return greetings;
|
||
|
>greetings : number
|
||
|
}
|
||
|
function greet2(greeting: string, n = 10, x?: string, ...restParams: string[]): number {
|
||
|
>greet2 : (greeting: string, n?: number, x?: string, ...restParams: string[]) => number
|
||
|
>greeting : string
|
||
|
>n : number
|
||
|
>x : string
|
||
|
>restParams : string[]
|
||
|
|
||
|
greetings++;
|
||
|
>greetings++ : number
|
||
|
>greetings : number
|
||
|
|
||
|
return greetings;
|
||
|
>greetings : number
|
||
|
}
|
||
|
function foo(greeting: string, n = 10, x?: string, ...restParams: string[])
|
||
|
>foo : (greeting: string, n?: number, x?: string, ...restParams: string[]) => void
|
||
|
>greeting : string
|
||
|
>n : number
|
||
|
>x : string
|
||
|
>restParams : string[]
|
||
|
{
|
||
|
return;
|
||
|
}
|