-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy pathdeclarationEmitSymbolPropertyKey.types
More file actions
53 lines (41 loc) · 1.23 KB
/
declarationEmitSymbolPropertyKey.types
File metadata and controls
53 lines (41 loc) · 1.23 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
//// [tests/cases/compiler/declarationEmitSymbolPropertyKey.ts] ////
=== node_modules/test-pkg/index.d.ts ===
declare const lostSymbol: unique symbol;
>lostSymbol : unique symbol
> : ^^^^^^^^^^^^^
type lostSymbol = typeof lostSymbol;
>lostSymbol : unique symbol
> : ^^^^^^^^^^^^^
>lostSymbol : unique symbol
> : ^^^^^^^^^^^^^
type SomeGeneric<T> = {
>SomeGeneric : SomeGeneric<T>
> : ^^^^^^^^^^^^^^
[lostSymbol]: T;
>[lostSymbol] : T
> : ^
>lostSymbol : unique symbol
> : ^^^^^^^^^^^^^
};
declare function fn(): SomeGeneric<unknown>;
>fn : () => SomeGeneric<unknown>
> : ^^^^^^
export {
lostSymbol,
>lostSymbol : unique symbol
> : ^^^^^^^^^^^^^
fn
>fn : () => SomeGeneric<unknown>
> : ^^^^^^
};
=== index.ts ===
import { fn } from 'test-pkg';
>fn : () => { [lostSymbol]: unknown; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
export const value = fn();
>value : { [lostSymbol]: unknown; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
>fn() : { [lostSymbol]: unknown; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
>fn : () => { [lostSymbol]: unknown; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^