28 lines
703 B
Text
28 lines
703 B
Text
=== tests/cases/compiler/sourceMapValidationFunctionExpressions.ts ===
|
|
var greetings = 0;
|
|
>greetings : number
|
|
>0 : number
|
|
|
|
var greet = (greeting: string): number => {
|
|
>greet : (greeting: string) => number
|
|
>(greeting: string): number => { greetings++; return greetings;} : (greeting: string) => number
|
|
>greeting : string
|
|
|
|
greetings++;
|
|
>greetings++ : number
|
|
>greetings : number
|
|
|
|
return greetings;
|
|
>greetings : number
|
|
}
|
|
greet("Hello");
|
|
>greet("Hello") : number
|
|
>greet : (greeting: string) => number
|
|
>"Hello" : string
|
|
|
|
var incrGreetings = () => greetings++;
|
|
>incrGreetings : () => number
|
|
>() => greetings++ : () => number
|
|
>greetings++ : number
|
|
>greetings : number
|
|
|