1 | import type { GenericDescriptor, PropertyDescriptor } from "../index";
|
2 |
|
3 | declare function CompletePropertyDescriptor<D extends PropertyDescriptor>(
|
4 | Desc: D & ThisType<any>,
|
5 | ): Required<
|
6 | D extends { "[[Value]]": infer T } ? GenericDescriptor & {
|
7 | "[[Value]]": T;
|
8 | "[[Writable]]": boolean;
|
9 | }
|
10 | : D extends { "[[Value]]"?: infer T | undefined } | { "[[Writable]]"?: boolean | undefined }
|
11 | ? GenericDescriptor & {
|
12 | "[[Value]]": T | undefined;
|
13 | "[[Writable]]": boolean;
|
14 | }
|
15 | : D extends { "[[Get]]"?: (() => infer T) | undefined } | { "[[Set]]"?: ((value: infer T) => void) | undefined }
|
16 | ? GenericDescriptor & {
|
17 | "[[Get]]": (() => T) | undefined;
|
18 | "[[Set]]": ((value: T) => void) | undefined;
|
19 | }
|
20 | : D & PropertyDescriptor
|
21 | >;
|
22 | declare function CompletePropertyDescriptor(Desc: PropertyDescriptor & ThisType<any>): Required<PropertyDescriptor>;
|
23 | export = CompletePropertyDescriptor;
|
24 |
|
\ | No newline at end of file |