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; interface TransformResult { code: string; map?: string; } type TransformOptions = DiOptions & { printer?: TS.Printer; cache?: Map; }; export type { DiOptions as D, TransformOptions as T, TransformResult as a, DiProgramOptions as b, DiIsolatedModulesOptions as c };