File: intersectionReduction.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (40 lines) | stat: -rw-r--r-- 1,541 bytes parent folder | download
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
=== tests/cases/conformance/types/intersection/intersectionReduction.ts ===
// @strict

declare const sym1: unique symbol;
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))

declare const sym2: unique symbol;
>sym2 : Symbol(sym2, Decl(intersectionReduction.ts, 3, 13))

type T1 = string & 'a';  // 'a'
>T1 : Symbol(T1, Decl(intersectionReduction.ts, 3, 34))

type T2 = 'a' & string & 'b';  // 'a' & 'b'
>T2 : Symbol(T2, Decl(intersectionReduction.ts, 5, 23))

type T3 = number & 10;  // 10
>T3 : Symbol(T3, Decl(intersectionReduction.ts, 6, 29))

type T4 = 10 & number & 20;  // 10 & 20
>T4 : Symbol(T4, Decl(intersectionReduction.ts, 7, 22))

type T5 = symbol & typeof sym1;  // typeof sym1
>T5 : Symbol(T5, Decl(intersectionReduction.ts, 8, 27))
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))

type T6 = typeof sym1 & symbol & typeof sym2;  // typeof sym1 & typeof sym2
>T6 : Symbol(T6, Decl(intersectionReduction.ts, 9, 31))
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))
>sym2 : Symbol(sym2, Decl(intersectionReduction.ts, 3, 13))

type T7 = string & 'a' & number & 10 & symbol & typeof sym1;  // 'a' & 10 & typeof sym1
>T7 : Symbol(T7, Decl(intersectionReduction.ts, 10, 45))
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))

type T10 = string & ('a' | 'b');  // 'a' | 'b'
>T10 : Symbol(T10, Decl(intersectionReduction.ts, 11, 60))

type T11 = (string | number) & ('a' | 10);  // 'a' | 10
>T11 : Symbol(T11, Decl(intersectionReduction.ts, 13, 32))