UNPKG

@altostra/core

Version:

Core library for shared types and logic

13 lines (12 loc) 781 B
import type { AbstractServiceClientClass, ServiceClientBase, ServiceClientMixin } from "./common"; export declare const configSym: unique symbol; export interface ConfigurableServiceClientParams<T extends object> { [configSym]: T; } interface ConfigurableServiceClientInstance<T extends object> { readonly config: T; readonly [configSym]: T; } export declare type ConfigurableServiceClientCtor<TConfig extends object, T extends AbstractServiceClientClass> = ServiceClientMixin<T, ConfigurableServiceClientInstance<TConfig>, ConfigurableServiceClientParams<TConfig>>; export declare function ConfigurableServiceClient<TConfig extends object, T extends (abstract new (...args: any[]) => ServiceClientBase)>(Base: T): ConfigurableServiceClientCtor<TConfig, T>; export {};