type CommonPropertyAttributes = { configurable?: boolean; enumerable?: boolean; }; type ReadOnlyPropertyDescriptor = { writable?: false; } & ({ value: T; } | { get(): T; }); type WritablePropertyDescriptor = { value: T; writable: true; } | { get(): T; set(value: T): void; }; export type PropertyDescriptor = CommonPropertyAttributes & (ReadOnlyPropertyDescriptor | WritablePropertyDescriptor); export type Property> = D extends WritablePropertyDescriptor ? { [p in N]: T; } : D extends ReadOnlyPropertyDescriptor ? { readonly [p in N]: T; } : never; type ExistingFields = Pick; export type Properties; }> = ExistingFields<{ [p in keyof D]: D[p] extends WritablePropertyDescriptor ? T : never; }> & ExistingFields<{ readonly [p in keyof D]: D[p] extends WritablePropertyDescriptor ? never : D[p] extends ReadOnlyPropertyDescriptor ? T : never; }>; export declare const defineProperty: >(dest: S, name: N, descriptor: D) => Omit & Property; export declare const defineProperties: ; [x: number]: PropertyDescriptor; [x: symbol]: PropertyDescriptor; }>(dest: S, descriptors: D) => Omit & Properties; export {};