File: nullishCoalescingOperator7.symbols

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (34 lines) | stat: -rw-r--r-- 1,402 bytes parent folder | download | duplicates (4)
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
=== tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator7.ts ===
declare const a: string | undefined;
>a : Symbol(a, Decl(nullishCoalescingOperator7.ts, 0, 13))

declare const b: string | undefined;
>b : Symbol(b, Decl(nullishCoalescingOperator7.ts, 1, 13))

declare const c: string | undefined;
>c : Symbol(c, Decl(nullishCoalescingOperator7.ts, 2, 13))

const foo1 = a ? 1 : 2;
>foo1 : Symbol(foo1, Decl(nullishCoalescingOperator7.ts, 4, 5))
>a : Symbol(a, Decl(nullishCoalescingOperator7.ts, 0, 13))

const foo2 = a ?? 'foo' ? 1 : 2;
>foo2 : Symbol(foo2, Decl(nullishCoalescingOperator7.ts, 5, 5))
>a : Symbol(a, Decl(nullishCoalescingOperator7.ts, 0, 13))

const foo3 = a ?? 'foo' ? (b ?? 'bar') : (c ?? 'baz');
>foo3 : Symbol(foo3, Decl(nullishCoalescingOperator7.ts, 6, 5))
>a : Symbol(a, Decl(nullishCoalescingOperator7.ts, 0, 13))
>b : Symbol(b, Decl(nullishCoalescingOperator7.ts, 1, 13))
>c : Symbol(c, Decl(nullishCoalescingOperator7.ts, 2, 13))

function f () {
>f : Symbol(f, Decl(nullishCoalescingOperator7.ts, 6, 54))

    const foo4 = a ?? 'foo' ? b ?? 'bar' : c ?? 'baz';
>foo4 : Symbol(foo4, Decl(nullishCoalescingOperator7.ts, 9, 9))
>a : Symbol(a, Decl(nullishCoalescingOperator7.ts, 0, 13))
>b : Symbol(b, Decl(nullishCoalescingOperator7.ts, 1, 13))
>c : Symbol(c, Decl(nullishCoalescingOperator7.ts, 2, 13))
}