File: fatarrowfunctionsErrors.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (37 lines) | stat: -rw-r--r-- 1,247 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
=== tests/cases/compiler/fatarrowfunctionsErrors.ts ===
foo((...Far:any[])=>{return 0;})
>Far : Symbol(Far, Decl(fatarrowfunctionsErrors.ts, 0, 5))

foo((1)=>{return 0;}); 
>return : Symbol(return, Decl(fatarrowfunctionsErrors.ts, 1, 10))

foo((x?)=>{return x;})
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 2, 5))
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 2, 5))

foo((x=0)=>{return x;})
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 3, 5))
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 3, 5))

var y = x:number => x*x;
>y : Symbol(y, Decl(fatarrowfunctionsErrors.ts, 4, 3))
>number : Symbol(number, Decl(fatarrowfunctionsErrors.ts, 4, 10))

false? (() => null): null;

// missing fatarrow
var x1 = () :void {};
>x1 : Symbol(x1, Decl(fatarrowfunctionsErrors.ts, 8, 3))

var x2 = (a:number) :void {};
>x2 : Symbol(x2, Decl(fatarrowfunctionsErrors.ts, 9, 3))
>a : Symbol(a, Decl(fatarrowfunctionsErrors.ts, 9, 10))

var x3 = (a:number) {};
>x3 : Symbol(x3, Decl(fatarrowfunctionsErrors.ts, 10, 3))
>a : Symbol(a, Decl(fatarrowfunctionsErrors.ts, 10, 10))

var x4= (...a: any[]) { };
>x4 : Symbol(x4, Decl(fatarrowfunctionsErrors.ts, 11, 3))
>a : Symbol(a, Decl(fatarrowfunctionsErrors.ts, 11, 9))