UNPKG

@data-client/endpoint

Version:

Declarative Network Interface Definitions

9 lines 798 B
import type { IEntityClass, IEntityInstance, EntityOptions, RequiredPKOptions, IDClass, Constructor, PKClass } from './EntityTypes.js'; /** * Turns any class into an Entity. * @see https://dataclient.io/rest/api/EntityMixin */ export default function EntityMixin<TBase extends PKClass>(Base: TBase, opt?: EntityOptions<InstanceType<TBase>>): IEntityClass<TBase> & TBase; export default function EntityMixin<TBase extends IDClass>(Base: TBase, opt?: EntityOptions<InstanceType<TBase>>): IEntityClass<TBase> & TBase & (new (...args: any[]) => IEntityInstance); export default function EntityMixin<TBase extends Constructor>(Base: TBase, opt: RequiredPKOptions<InstanceType<TBase>>): IEntityClass<TBase> & TBase & (new (...args: any[]) => IEntityInstance); //# sourceMappingURL=EntityMixin.d.ts.map