export declare type PrimitiveValue = { type: 'PrimitiveValue'; value: number | string | boolean | null | undefined; }; export interface IArrayValue { type: 'ArrayValue'; value: T[]; } export interface IObjectValue { type: 'ObjectValue'; value: { [k: string]: T; }; } /** * Type for an Internal Reference */ export declare type InternalReference = { type: 'InternalReference'; value: string; }; export declare type UnresolvedValue = { type: 'Unresolved'; value: string; location?: SourceLocation; }; export declare type ImportReference = { type: 'ImportReference'; value: string; namespacedMember?: string; location?: SourceLocation; }; export declare type FunctionReference = { type: 'FunctionReference'; value: number; }; export declare type AdgReference = { type: 'AdgReference'; value: number; location?: SourceLocation; }; export declare type CompositionReference = { type: 'CompositionReference'; value: number; }; export declare type PropertyReference = { type: 'PropertyReference'; value: string; }; export declare type Binding = { type: 'Binding'; value: string; }; export declare type SourceLocation = { startLine: number; startColumn: number; endLine: number; endColumn: number; }; export declare type StaticValue = PrimitiveValue | ImportReference | UnresolvedValue | IArrayValue | IObjectValue; export declare type Value = StaticValue | PropertyReference | IArrayValue | IObjectValue | Binding; export declare type Property = { isPublic?: boolean; initial?: StaticValue; input?: StaticValue | FunctionReference; }; export declare type FunctionType = { reference: ImportReference | InternalReference | UnresolvedValue; input?: Value[]; type: string; location?: SourceLocation; }; export declare type WireFunction = FunctionType & { type: 'WireFunction'; adapterLocation?: SourceLocation; adapterConfigLocations?: { [prop: string]: SourceLocation; }; }; /** * A special type of function that just holds the info about an error that broke esm */ export declare type ErrorFunction = FunctionType & { type: 'ErrorFunction'; input: Value; reference: UnresolvedValue; }; export declare type Adg = { parentClass?: ImportReference | AdgReference | UnresolvedValue; properties?: { [k: string]: Property; }; functions?: FunctionType[]; compositions?: (CompositionReference | ImportReference)[]; }; /** Image type which itself is a type of Composition */ export declare type Image = Composition & { type: 'Image'; src: PrimitiveValue | Binding; }; export declare type Composition = { type: 'Container' | 'Iteration' | 'Slot' | 'ComposedAdg' | 'Image'; isActive?: Condition; compositions?: Composition[]; location?: SourceLocation; }; declare type Condition = { input: Binding; negate?: boolean; }; export declare type Container = Composition & { type: 'Container'; slot?: string; key?: Binding; }; export declare type Iteration = Composition & { type: 'Iteration'; input: Binding; iterator: string; /** Name of target slot composition, empty string for default slot. */ slot?: string; }; export declare type Slot = Composition & { type: 'Slot'; name: string; key?: Binding; /** Name of target slot composition, empty string for default slot. */ slot?: string; }; export declare type ComposedAdg = Composition & { type: 'ComposedAdg'; input: Binding | ImportReference; properties?: { [k: string]: Binding | PrimitiveValue; }; slot?: string; key?: Binding; }; export declare type Import = { resourceName: string; names: string[]; }; export declare type Export = AdgReference | CompositionReference; export declare type KomaciDocument = { adgs?: Adg[]; compositions?: Composition[]; imports?: Import[]; exports?: { [k: string]: Export | null; }; }; export {}; //# sourceMappingURL=index.d.ts.map