/** * Alias to Array.isArray. */ export declare const isArray: (typeof Array)["isArray"]; /** * Alias to Object.getOwnPropertyDescriptor. */ export declare const getOwnPropertyDescriptor: (typeof Object)["getOwnPropertyDescriptor"]; /** * Alias to Object.getOwnPropertyDescriptors. */ export declare const getOwnPropertyDescriptors: (typeof Object)["getOwnPropertyDescriptors"]; /** * Like Object.getOwnPropertyDescriptor, but for all the property chain. * @param object The object to get the descriptor from. * @param propertyKey The property key. * @returns A prototyped property descriptor. */ export declare const getPropertyDescriptor: (object: object, propertyKey: PropertyKey) => PropertyDescriptor | undefined; /** * Alias to Object.setPrototypeOf. */ export declare const getPrototypeOf: (typeof Object)["getPrototypeOf"]; /** * Alias to Object.setPrototypeOf. */ export declare const setPrototypeOf: (typeof Object)["setPrototypeOf"]; /** * Alias to Object.prototype.hasOwnProperty. */ export declare const hasOwn: (typeof Object)["hasOwnProperty"]; /** * Alias to Object.defineProperty. */ export declare const defineProperty: (typeof Object)["defineProperty"]; /** * Check if a node is an Element. * @param node The node to check. * @returns True if the node is an Element. */ export declare const isElement: (node: unknown) => node is Element; /** * Check if runtime has DOM specs. */ export declare const isBrowser: boolean; declare global { interface SymbolConstructor { readonly metadata: unique symbol; } } /** * Constructor type helper. */ export interface Constructor { readonly [Symbol.metadata]?: DecoratorMetadataObject | null; new (...args: any[]): T; prototype: T; } /** * Decorator class element descriptor. */ export interface ClassElement< T, P > { /** * The kind of the class element. */ kind: "field" | "method"; /** * The name of the element. */ key: PropertyKey; /** * The type of the element. */ placement: "static" | "prototype" | "own"; /** * An initializer function. */ initializer?: () => P; /** * The element property descriptor. */ descriptor?: PropertyDescriptor; /** * The descriptor finisher method. */ finisher?: (ctr: Constructor) => void; } /** * The class descriptor interface. */ export type ClassDescriptor< T, P > = { kind: "class"; elements: ClassElement[]; finisher?: (ctr: Constructor) => Constructor | undefined; };