File: typeSatisfaction_contextualTyping1.symbols

package info (click to toggle)
node-typescript 5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 497,488 kB
  • sloc: javascript: 2,107,274; makefile: 6; sh: 1
file content (24 lines) | stat: -rw-r--r-- 1,120 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
//// [tests/cases/conformance/expressions/typeSatisfaction/typeSatisfaction_contextualTyping1.ts] ////

=== typeSatisfaction_contextualTyping1.ts ===
type Predicates = { [s: string]: (n: number) => boolean };
>Predicates : Symbol(Predicates, Decl(typeSatisfaction_contextualTyping1.ts, 0, 0))
>s : Symbol(s, Decl(typeSatisfaction_contextualTyping1.ts, 0, 21))
>n : Symbol(n, Decl(typeSatisfaction_contextualTyping1.ts, 0, 34))

const p = {
>p : Symbol(p, Decl(typeSatisfaction_contextualTyping1.ts, 2, 5))

    isEven: n => n % 2 === 0,
>isEven : Symbol(isEven, Decl(typeSatisfaction_contextualTyping1.ts, 2, 11))
>n : Symbol(n, Decl(typeSatisfaction_contextualTyping1.ts, 3, 11))
>n : Symbol(n, Decl(typeSatisfaction_contextualTyping1.ts, 3, 11))

    isOdd: n => n % 2 === 1
>isOdd : Symbol(isOdd, Decl(typeSatisfaction_contextualTyping1.ts, 3, 29))
>n : Symbol(n, Decl(typeSatisfaction_contextualTyping1.ts, 4, 10))
>n : Symbol(n, Decl(typeSatisfaction_contextualTyping1.ts, 4, 10))

} satisfies Predicates;
>Predicates : Symbol(Predicates, Decl(typeSatisfaction_contextualTyping1.ts, 0, 0))