import type { Generics } from '../Generics-augmentation.js'; import type { Get_ } from '../object/get-set/get/get/Get.js'; import type { AlsoAccept, Override, Override_ } from '../type/index.js'; declare global { namespace Voltiso { const OPTIONS: unique symbol; type OPTIONS = typeof OPTIONS; const PARTIAL_OPTIONS: unique symbol; type PARTIAL_OPTIONS = typeof PARTIAL_OPTIONS; const DEFAULT_OPTIONS: unique symbol; type DEFAULT_OPTIONS = typeof DEFAULT_OPTIONS; const BASE_OPTIONS: unique symbol; type BASE_OPTIONS = typeof BASE_OPTIONS; const HIDDEN_OPTIONS: unique symbol; type HIDDEN_OPTIONS = typeof HIDDEN_OPTIONS; const GENERIC_ID: unique symbol; type GENERIC_ID = typeof GENERIC_ID; } } export type OPTIONS = typeof Voltiso.OPTIONS; export declare const OPTIONS: OPTIONS; export type PARTIAL_OPTIONS = Voltiso.PARTIAL_OPTIONS; export declare const PARTIAL_OPTIONS: PARTIAL_OPTIONS; export type DEFAULT_OPTIONS = Voltiso.DEFAULT_OPTIONS; export declare const DEFAULT_OPTIONS: DEFAULT_OPTIONS; export type BASE_OPTIONS = Voltiso.BASE_OPTIONS; export declare const BASE_OPTIONS: BASE_OPTIONS; export type HIDDEN_OPTIONS = Voltiso.HIDDEN_OPTIONS; export declare const HIDDEN_OPTIONS: HIDDEN_OPTIONS; export type GENERIC_ID = Voltiso.GENERIC_ID; export declare const GENERIC_ID: GENERIC_ID; /** Utility for building polymorphic builder-like interfaces */ export interface PolymorphicGeneric { /** * ID used to get the generic by name * * Please override! * * 🌿 Type-only (no value at runtime) */ readonly [GENERIC_ID]: symbol; /** * Please override! * * 🌿 Type-only (no value at runtime) */ readonly [Voltiso.BASE_OPTIONS]: {}; /** * Please override! * * 🌿 Type-only (no value at runtime) */ readonly [Voltiso.DEFAULT_OPTIONS]: {}; /** * Instance options that are not part of the generic type parameter (but can * depend on it) * * Please override! * * 🌿 Type-only (no value at runtime) */ readonly [Voltiso.HIDDEN_OPTIONS]: {}; /** * For accessing the generic type parameter * * - Not meant to me overridden * * 🌿 Type-only (no value at runtime) */ readonly [PARTIAL_OPTIONS]: O; /** * Access options * * - Not meant to me overridden * * 🌿 Type-only (no value at runtime) */ readonly [Voltiso.OPTIONS]: PolymorphicGeneric.GetOptions; } /** Utility for building polymorphic builder-like interfaces */ export declare class PolymorphicGeneric { readonly options: this[Voltiso.OPTIONS] & this[HIDDEN_OPTIONS]; /** Static */ get defaultOptions(): this[DEFAULT_OPTIONS] & Rebind[HIDDEN_OPTIONS]; constructor(partialOptions: PolymorphicGeneric[OPTIONS] & PolymorphicGeneric[HIDDEN_OPTIONS]); rebind | Partial | AlsoAccept<{}>>(partialOptions: NewOptions): Rebind; } export declare namespace PolymorphicGeneric { type GetOptions, O extends Partial>> = Override_, O>; } export type Rebind | AlsoAccept<{}>> = Rebind.GetProperty>, Instance[GENERIC_ID]>; export type Rebind_ = [Instance] extends [ { [BASE_OPTIONS]: {}; [PARTIAL_OPTIONS]: {}; [GENERIC_ID]: symbol; } ] ? [NewOptions] extends [{}] ? Rebind : never : never; export declare namespace Rebind { type GetProperty = K extends keyof T ? T[K] : never; } //# sourceMappingURL=PolymorphicGeneric.d.ts.map