UNPKG

1.27 kBTypeScriptView Raw
1export = d;
2
3declare function d(value: any, options?: PropertyDescriptor): PropertyDescriptor;
4declare function d(flags: d.Flags, value: any, options?: PropertyDescriptor): PropertyDescriptor;
5
6declare namespace d {
7 function gs(flags: GetSetFlags, options: PropertyDescriptor): PropertyDescriptor;
8 function gs(flags: GetSetFlags, get: (...args: any[]) => any, options: PropertyDescriptor): PropertyDescriptor;
9 function gs(
10 get: (...args: any[]) => any,
11 set?: ((...args: any[]) => any) | null,
12 options?: PropertyDescriptor,
13 ): PropertyDescriptor;
14 function gs(
15 get: ((...args: any[]) => any) | null | undefined,
16 set: (...args: any[]) => any,
17 options?: PropertyDescriptor,
18 ): PropertyDescriptor;
19 function gs(
20 flags: GetSetFlags,
21 get: (...args: any[]) => any,
22 set?: ((...args: any[]) => any) | null,
23 options?: PropertyDescriptor,
24 ): PropertyDescriptor;
25 function gs(
26 flags: GetSetFlags,
27 get: ((...args: any[]) => any) | null | undefined,
28 set: (...args: any[]) => any,
29 options?: PropertyDescriptor,
30 ): PropertyDescriptor;
31
32 type GetSetFlags = "c" | "e" | "ce";
33 type Flags = GetSetFlags | "w" | "cw" | "ew" | "cew";
34}