File: conditionalTypesExcessProperties.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 (41 lines) | stat: -rw-r--r-- 2,089 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
38
39
40
41
=== tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts ===
type Something<T> = { test: string } &  (T extends object ? {
>Something : Symbol(Something, Decl(conditionalTypesExcessProperties.ts, 0, 0))
>T : Symbol(T, Decl(conditionalTypesExcessProperties.ts, 0, 15))
>test : Symbol(test, Decl(conditionalTypesExcessProperties.ts, 0, 21))
>T : Symbol(T, Decl(conditionalTypesExcessProperties.ts, 0, 15))

    arg: T
>arg : Symbol(arg, Decl(conditionalTypesExcessProperties.ts, 0, 61))
>T : Symbol(T, Decl(conditionalTypesExcessProperties.ts, 0, 15))

} : {
    arg?: undefined
>arg : Symbol(arg, Decl(conditionalTypesExcessProperties.ts, 2, 5))

    });

function testFunc2<A extends object>(a: A, sa: Something<A>) {
>testFunc2 : Symbol(testFunc2, Decl(conditionalTypesExcessProperties.ts, 4, 7))
>A : Symbol(A, Decl(conditionalTypesExcessProperties.ts, 6, 19))
>a : Symbol(a, Decl(conditionalTypesExcessProperties.ts, 6, 37))
>A : Symbol(A, Decl(conditionalTypesExcessProperties.ts, 6, 19))
>sa : Symbol(sa, Decl(conditionalTypesExcessProperties.ts, 6, 42))
>Something : Symbol(Something, Decl(conditionalTypesExcessProperties.ts, 0, 0))
>A : Symbol(A, Decl(conditionalTypesExcessProperties.ts, 6, 19))

    sa = { test: 'hi', arg: a }; // not excess (but currently still not assignable)
>sa : Symbol(sa, Decl(conditionalTypesExcessProperties.ts, 6, 42))
>test : Symbol(test, Decl(conditionalTypesExcessProperties.ts, 7, 10))
>arg : Symbol(arg, Decl(conditionalTypesExcessProperties.ts, 7, 22))
>a : Symbol(a, Decl(conditionalTypesExcessProperties.ts, 6, 37))

    sa = { test: 'bye', arg: a, arr: a } // excess
>sa : Symbol(sa, Decl(conditionalTypesExcessProperties.ts, 6, 42))
>test : Symbol(test, Decl(conditionalTypesExcessProperties.ts, 8, 10))
>arg : Symbol(arg, Decl(conditionalTypesExcessProperties.ts, 8, 23))
>a : Symbol(a, Decl(conditionalTypesExcessProperties.ts, 6, 37))
>arr : Symbol(arr, Decl(conditionalTypesExcessProperties.ts, 8, 31))
>a : Symbol(a, Decl(conditionalTypesExcessProperties.ts, 6, 37))
}