import * as TS from 'typescript'; import { MaybeArray } from 'helpertypes'; interface DiOptionsBase { typescript?: typeof TS; } interface DiProgramOptions extends DiOptionsBase { program: TS.Program; } interface DiIsolatedModulesOptions extends DiOptionsBase { /** * The identifier(s) that should be considered instances of DIContainer. When not given, an attempt will be * made to evaluate and resolve the value of identifiers to check if they are instances of DIContainer. * Providing one or more identifiers up front can be considered an optimization, as this step can be skipped that way */ identifier?: MaybeArray; compilerOptions?: TS.CompilerOptions; } type DiOptions = DiProgramOptions | DiIsolatedModulesOptions; /** * CustomTransformer that associates constructor arguments with any given class declaration */ declare function di(options: DiOptions): TS.CustomTransformers; interface TransformResult { code: string; map?: string; } type TransformOptions = DiOptions & { printer?: TS.Printer; cache?: Map; }; /** * CustomTransformer that associates constructor arguments with any given class declaration */ declare function transform(source: string, options?: TransformOptions): TransformResult; declare function transform(source: string, filename: string, options?: TransformOptions): TransformResult; export { type DiIsolatedModulesOptions, type DiOptions, type DiProgramOptions, type TransformOptions, type TransformResult, di, transform };