import { Dict } from './dict'; import { Invocable } from './invocable'; export interface BaseEvaluableInjection { type: string; } export interface StaticInjection extends BaseEvaluableInjection { type: 'static'; value: any; } export interface CreatableInjection extends BaseEvaluableInjection { type: 'creatable'; source: Specifier; constructorArgs?: Injection[]; } export interface PropertyInjection extends BaseEvaluableInjection { type: 'property'; source: Specifier; property: string; constructorArgs?: Injection[]; } export interface MethodInjection extends BaseEvaluableInjection { type: 'method'; source: Specifier; method: string; constructorArgs?: Injection[]; args?: Injection[]; } export interface InvocableInjection extends BaseEvaluableInjection { type: 'invocable'; source: Specifier; args?: Injection[]; } export interface DictionaryInjection extends BaseEvaluableInjection { type: 'dictionary'; value: Dict>; } export interface ObjectInjection extends BaseEvaluableInjection { type: 'object'; keys: Injection[]; values: Injection[]; } export interface ArrayInjection extends BaseEvaluableInjection { type: 'array'; values: Injection[]; } export type EvaluableInjection = StaticInjection | CreatableInjection | PropertyInjection | MethodInjection | InvocableInjection | DictionaryInjection | ObjectInjection | ArrayInjection; export type Injection = EvaluableInjection | boolean | string | number | null;