UNPKG

@carlosv2/glue

Version:

Dependency injection library that stays out of the way

54 lines 3.17 kB
import { Alias } from '../alias.js'; import { Buildable } from '../buildable.js'; import { DefinitionContext } from '../context/index.js'; import { Call, Processor } from '../processor.js'; import { Service, Tag } from '../service.js'; import { Maybe } from '../utils.js'; import { Value } from '../value.js'; import type { Container } from '../container.js'; export declare abstract class Loader extends Processor<Buildable> { private readonly defaultScope; private readonly parameters; private readonly aliases; private readonly services; constructor(defaultScope?: string); protected glob(_: string): string[]; protected getFullPath(baseFile: string, relative: string): string; protected readContents(_: string): string; private importPath; protected addExtend(path: string): void; addParameter(id: string, definition: Value): void; hasParameter(id: string): boolean; getParameter(id: string): Value; getAllParameters(): string[]; removeParameter(id: string): void; addAlias(id: string, definition: Alias): void; hasAlias(id: string): boolean; getAlias(id: string): Alias; getAllAliases(): string[]; removeAlias(id: string): void; addService(id: string, definition: Service): void; hasService(id: string): boolean; getService(id: string): Service; getAllServices(): string[]; removeService(id: string): void; protected processEnvStrValue(context: DefinitionContext, name: string, fallback: Maybe<string>): Buildable; protected processEnvBoolValue(context: DefinitionContext, name: string, fallback: Maybe<string>): Buildable; protected processEnvNumValue(context: DefinitionContext, name: string, fallback: Maybe<string>): Buildable; protected processEvalValue(context: DefinitionContext, code: string): Buildable; protected processLiteralValue(context: DefinitionContext, value: unknown): Buildable; protected processParameterValue(context: DefinitionContext, id: string): Buildable; protected processServiceValue(context: DefinitionContext, id: string): Buildable; private isClass; private isFunc; private getTheOnlyOne; protected processSymbolValue(context: DefinitionContext, path: string, name: Maybe<string>): Buildable; protected processTagListValue(context: DefinitionContext, name: string): Buildable; protected processTagObjectValue(context: DefinitionContext, name: string): Buildable; protected processAlias(context: DefinitionContext, aliased: string): Buildable; protected processConstructorService(context: DefinitionContext, symbol: Buildable, args: Buildable[], scope: string, tags: Tag[], calls: Call<Buildable>[]): Buildable; protected processFactoryService(context: DefinitionContext, symbol: Buildable, factory: Buildable, args: Buildable[], scope: string, tags: Tag[], calls: Call<Buildable>[]): Buildable; protected processPropertyService(context: DefinitionContext, symbol: Buildable, property: Buildable, scope: string, tags: Tag[], calls: Call<Buildable>[]): Buildable; getContainer(scope?: string, parent?: Container): Container; } //# sourceMappingURL=loader.d.ts.map