File: typeAliasFunctionTypeSharedSymbol.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,840 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
=== tests/cases/compiler/typeAliasFunctionTypeSharedSymbol.ts ===
// Repro from comment in #21496

function Mixin<TBase extends {new (...args: any[]): {}}>(Base: TBase) {
>Mixin : Symbol(Mixin, Decl(typeAliasFunctionTypeSharedSymbol.ts, 0, 0), Decl(typeAliasFunctionTypeSharedSymbol.ts, 5, 1))
>TBase : Symbol(TBase, Decl(typeAliasFunctionTypeSharedSymbol.ts, 2, 15))
>args : Symbol(args, Decl(typeAliasFunctionTypeSharedSymbol.ts, 2, 35))
>Base : Symbol(Base, Decl(typeAliasFunctionTypeSharedSymbol.ts, 2, 57))
>TBase : Symbol(TBase, Decl(typeAliasFunctionTypeSharedSymbol.ts, 2, 15))

    return class extends Base {
>Base : Symbol(Base, Decl(typeAliasFunctionTypeSharedSymbol.ts, 2, 57))

    };
}

type Mixin = ReturnTypeOf<typeof Mixin>
>Mixin : Symbol(Mixin, Decl(typeAliasFunctionTypeSharedSymbol.ts, 0, 0), Decl(typeAliasFunctionTypeSharedSymbol.ts, 5, 1))
>ReturnTypeOf : Symbol(ReturnTypeOf, Decl(typeAliasFunctionTypeSharedSymbol.ts, 7, 39))
>Mixin : Symbol(Mixin, Decl(typeAliasFunctionTypeSharedSymbol.ts, 0, 0), Decl(typeAliasFunctionTypeSharedSymbol.ts, 5, 1))

type ReturnTypeOf<V> = V extends (...args: any[])=>infer R ? R : never;
>ReturnTypeOf : Symbol(ReturnTypeOf, Decl(typeAliasFunctionTypeSharedSymbol.ts, 7, 39))
>V : Symbol(V, Decl(typeAliasFunctionTypeSharedSymbol.ts, 9, 18))
>V : Symbol(V, Decl(typeAliasFunctionTypeSharedSymbol.ts, 9, 18))
>args : Symbol(args, Decl(typeAliasFunctionTypeSharedSymbol.ts, 9, 34))
>R : Symbol(R, Decl(typeAliasFunctionTypeSharedSymbol.ts, 9, 56))
>R : Symbol(R, Decl(typeAliasFunctionTypeSharedSymbol.ts, 9, 56))

type Crashes = number & Mixin;
>Crashes : Symbol(Crashes, Decl(typeAliasFunctionTypeSharedSymbol.ts, 9, 71))
>Mixin : Symbol(Mixin, Decl(typeAliasFunctionTypeSharedSymbol.ts, 0, 0), Decl(typeAliasFunctionTypeSharedSymbol.ts, 5, 1))