File: intersectionTypeInference1.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 (33 lines) | stat: -rw-r--r-- 1,899 bytes parent folder | download | duplicates (7)
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
=== tests/cases/compiler/intersectionTypeInference1.ts ===
// Repro from #8801

function alert(s: string) {}
>alert : Symbol(alert, Decl(intersectionTypeInference1.ts, 0, 0))
>s : Symbol(s, Decl(intersectionTypeInference1.ts, 2, 15))

const parameterFn = (props:{store:string}) => alert(props.store)
>parameterFn : Symbol(parameterFn, Decl(intersectionTypeInference1.ts, 4, 5))
>props : Symbol(props, Decl(intersectionTypeInference1.ts, 4, 21))
>store : Symbol(store, Decl(intersectionTypeInference1.ts, 4, 28))
>alert : Symbol(alert, Decl(intersectionTypeInference1.ts, 0, 0))
>props.store : Symbol(store, Decl(intersectionTypeInference1.ts, 4, 28))
>props : Symbol(props, Decl(intersectionTypeInference1.ts, 4, 21))
>store : Symbol(store, Decl(intersectionTypeInference1.ts, 4, 28))

const brokenFunction = <OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o
>brokenFunction : Symbol(brokenFunction, Decl(intersectionTypeInference1.ts, 5, 5))
>OwnProps : Symbol(OwnProps, Decl(intersectionTypeInference1.ts, 5, 24))
>f : Symbol(f, Decl(intersectionTypeInference1.ts, 5, 34))
>p : Symbol(p, Decl(intersectionTypeInference1.ts, 5, 38))
>dispatch : Symbol(dispatch, Decl(intersectionTypeInference1.ts, 5, 42))
>OwnProps : Symbol(OwnProps, Decl(intersectionTypeInference1.ts, 5, 24))
>o : Symbol(o, Decl(intersectionTypeInference1.ts, 5, 85))
>OwnProps : Symbol(OwnProps, Decl(intersectionTypeInference1.ts, 5, 24))
>o : Symbol(o, Decl(intersectionTypeInference1.ts, 5, 85))

export const Form3 = brokenFunction(parameterFn)({store: "hello"})
>Form3 : Symbol(Form3, Decl(intersectionTypeInference1.ts, 6, 12))
>brokenFunction : Symbol(brokenFunction, Decl(intersectionTypeInference1.ts, 5, 5))
>parameterFn : Symbol(parameterFn, Decl(intersectionTypeInference1.ts, 4, 5))
>store : Symbol(store, Decl(intersectionTypeInference1.ts, 6, 50))