2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/sourceMapValidationFunctionExpressions.ts ===
|
|
|
|
var greetings = 0;
|
|
|
|
>greetings : number
|
|
|
|
|
|
|
|
var greet = (greeting: string): number => {
|
|
|
|
>greet : (greeting: string) => number
|
2014-08-22 03:39:46 +02:00
|
|
|
>(greeting: string): number => { greetings++; return greetings;} : (greeting: string) => number
|
2014-08-15 23:33:16 +02:00
|
|
|
>greeting : string
|
|
|
|
|
|
|
|
greetings++;
|
|
|
|
>greetings++ : number
|
|
|
|
>greetings : number
|
|
|
|
|
|
|
|
return greetings;
|
|
|
|
>greetings : number
|
|
|
|
}
|
|
|
|
greet("Hello");
|
|
|
|
>greet("Hello") : number
|
|
|
|
>greet : (greeting: string) => number
|
|
|
|
|
|
|
|
var incrGreetings = () => greetings++;
|
|
|
|
>incrGreetings : () => number
|
|
|
|
>() => greetings++ : () => number
|
|
|
|
>greetings++ : number
|
|
|
|
>greetings : number
|
|
|
|
|