UNPKG

@decaf-ts/core

Version:

Core persistence module for the decaf framework

15 lines (14 loc) 895 B
import { Constructor } from "@decaf-ts/decorator-validation"; import { Model } from "@decaf-ts/decorator-validation"; /** * @description Generates a unique injectable name for a repository. * @summary Creates a standardized name for repository injectables based on model and adapter flavour. * @template T - The model type that extends Model. * @param {Constructor<T> | T} model - The model constructor or instance. * @param {string} [flavour] - Optional adapter flavour. If not provided, it will be retrieved from the model metadata. * @return {string} The generated injectable name. * @throws {InternalError} If no flavour is provided and none can be retrieved from the model. * @function generateInjectableNameForRepository * @memberOf module:core */ export declare function generateInjectableNameForRepository<T extends Model>(model: Constructor<T> | T, flavour?: string): string;