UNPKG

trusktr-dummy-test-pkg

Version:

JavaScript/TypeScript class inheritance tools.

23 lines (22 loc) 1.59 kB
export declare class WeakTwoWayMap { m: WeakMap<object, any>; set(a: Object, b: Object): void; get(item: Object): any; has(item: Object): boolean; } export declare function getFunctionBody(fn: Function): string; export declare function setDescriptor(obj: Object, key: string, newDescriptor: PropertyDescriptor, inherited?: boolean): void; export declare function setDescriptors(obj: Object, newDescriptors: Record<string, PropertyDescriptor>): void; export declare function propertyIsAccessor(obj: Object | PropertyDescriptor, key?: string, inherited?: boolean): boolean; interface DescriptorWithOwner extends PropertyDescriptor { owner: object; } export declare function getInheritedDescriptor(obj: object, key: string): DescriptorWithOwner | undefined; export declare function getInheritedPropertyNames(obj: Object): string[]; export declare type Constructor<T = object, A extends any[] = any[], Static = {}> = (new (...a: A) => T) & Static; export declare function Constructor<T = object, Static = {}>(Ctor: Constructor<any>): Constructor<T> & Static; export declare function hasPrototype(obj: any, proto: any): boolean; export declare function copyDescriptors(source: Object, destination: Object, mod?: any): void; export declare function setDefaultPrototypeDescriptors(prototype: Object, { defaultClassDescriptor: { writable, enumerable, configurable } }: any): void; export declare function setDefaultStaticDescriptors(Ctor: any, { defaultClassDescriptor: { writable, enumerable, configurable } }: any, staticBlacklist?: (string | symbol)[]): void; export {};