import type { Stream, StreamIO } from '../data/Stream'; import type { DictType, StringType } from '../east'; /** A component of the path identifying the location of a module inside a template */ export type StaticModulePathComponent = { type: 'static'; name: string; }; /** A component of the path identifying the location of a module inside a template */ export type DynamicModulePathComponent = { type: 'dynamic'; name: string; key_type: StringType; }; /** A component of the path identifying the location of a module */ export type ModulePathComponent = StaticModulePathComponent | DynamicModulePathComponent; /** A path from the template root to a module */ export type ModulePath = ModulePathComponent[]; /** A static namespace for template components */ export type StaticModule = { type: 'static'; name: string; module: ModulePath; }; /** A dynamic namespace for template components, that can be instantiated at runtime */ export type DynamicModule = { type: 'dynamic'; name: string; module: ModulePath; stream: Stream; }; /** A namespace for template components */ export type Module = StaticModule | DynamicModule; export declare function printModulePath(module: ModulePath): string; /** Determine if `module` is visible inside `from`. * * This is `true` when the module path of `from` starts with the module path of `module`, and `false` otherwise. */ export declare function modulePathEqual(first: ModulePath, second: ModulePath): boolean; /** Check if `module` is visible inside `from`, otherwise throw an error. * * This is `true` when the module path of `from` starts with the module path of `module`, and `false` otherwise. */ export declare function checkImport(module: ModulePath, from: ModulePath): void; export type StaticExportTaskDescription = { task_type: 'static_export'; name: string; module: ModulePath; inputs: { input: StreamIO; }; outputs: { output: StreamIO; }; }; export type DynamicExportTaskDescription = { task_type: 'dynamic_export'; name: string; module: ModulePath; inputs: { input: StreamIO; keys: StreamIO; }; outputs: { output: StreamIO; }; };