File: weakTypeAndPrimitiveNarrowing.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 (65 lines) | stat: -rw-r--r-- 2,417 bytes parent folder | download | duplicates (2)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
=== tests/cases/compiler/weakTypeAndPrimitiveNarrowing.ts ===
type LiteralsAndWeakTypes = 
>LiteralsAndWeakTypes : Symbol(LiteralsAndWeakTypes, Decl(weakTypeAndPrimitiveNarrowing.ts, 0, 0))

  | 'A'
  | 'B'
  | { optional?: true }
>optional : Symbol(optional, Decl(weakTypeAndPrimitiveNarrowing.ts, 3, 5))

  | { toLowerCase?(): string }
>toLowerCase : Symbol(toLowerCase, Decl(weakTypeAndPrimitiveNarrowing.ts, 4, 5))

  | { toUpperCase?(): string, otherOptionalProp?: number };
>toUpperCase : Symbol(toUpperCase, Decl(weakTypeAndPrimitiveNarrowing.ts, 5, 5))
>otherOptionalProp : Symbol(otherOptionalProp, Decl(weakTypeAndPrimitiveNarrowing.ts, 5, 29))

const g = (arg: LiteralsAndWeakTypes) => {
>g : Symbol(g, Decl(weakTypeAndPrimitiveNarrowing.ts, 7, 5))
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 7, 11))
>LiteralsAndWeakTypes : Symbol(LiteralsAndWeakTypes, Decl(weakTypeAndPrimitiveNarrowing.ts, 0, 0))

    if (arg === 'A') {
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 7, 11))

      arg;
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 7, 11))

    } else {
      arg;
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 7, 11))
    }
}

type PrimitivesAndWeakTypes =
>PrimitivesAndWeakTypes : Symbol(PrimitivesAndWeakTypes, Decl(weakTypeAndPrimitiveNarrowing.ts, 13, 1))

  | string
  | number
  | { optional?: true }
>optional : Symbol(optional, Decl(weakTypeAndPrimitiveNarrowing.ts, 18, 5))

  | { toLowerCase?(): string }
>toLowerCase : Symbol(toLowerCase, Decl(weakTypeAndPrimitiveNarrowing.ts, 19, 5))

  | { toUpperCase?(): string, otherOptionalProp?: number };
>toUpperCase : Symbol(toUpperCase, Decl(weakTypeAndPrimitiveNarrowing.ts, 20, 5))
>otherOptionalProp : Symbol(otherOptionalProp, Decl(weakTypeAndPrimitiveNarrowing.ts, 20, 29))

const h = (arg: PrimitivesAndWeakTypes) => {
>h : Symbol(h, Decl(weakTypeAndPrimitiveNarrowing.ts, 22, 5))
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 22, 11))
>PrimitivesAndWeakTypes : Symbol(PrimitivesAndWeakTypes, Decl(weakTypeAndPrimitiveNarrowing.ts, 13, 1))

    if (arg === 'A') {
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 22, 11))

      arg;
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 22, 11))

    } else {
      arg;
>arg : Symbol(arg, Decl(weakTypeAndPrimitiveNarrowing.ts, 22, 11))
    }
}