@akala/core
Version:
13 lines (12 loc) • 541 B
TypeScript
/**
* Decorator factory for registering a service with dependency injection
* @param name - Unique service name for registration
* @param toInject - Array of dependency names to inject into the service constructor
* @returns Class decorator that registers the service with the default injector
* @example
* @service('myService', 'dep1', 'dep2')
* class MyService {
* constructor(dep1, dep2) {...}
* }
*/
export declare function service(name: string, ...toInject: string[]): (target: new (...args: unknown[]) => unknown) => void;