import { Variable } from '../east/functions'; import { ArrayType, DictType, EastType, StringType, StructType } from '../east/types'; import type { ModulePath } from '../template'; /** * The definition of a {@link Stream}. * * @remarks This object should NOT be used to create a {@link Stream}, see {@link SourceBuilder} instead. * * @category Stream */ export type Stream = { name: string; module: ModulePath; type: T; writable: boolean; }; /** * Create a {@link Stream}. * * @remarks This function should NOT be used to create a {@link Stream}, see {@link SourceBuilder} instead. * * @param name the name of the stream * @param module the {@link ModulePath} of the module containing the stream * @param type the {@link EastType} of the value contained in the stream * @returns a valid {@link Stream} * * @category Stream * */ export declare function Stream(name: string, module: ModulePath, type: T, writable?: boolean): Stream; export type StreamIO = { name: string; module: ModulePath; type: T; optional: boolean; writable: boolean; }; export declare function StreamIO(stream: Stream, optional?: boolean, writable?: boolean): StreamIO; /** * The definition of a tabular {@link Stream}. * * @remarks This object should NOT be used to create a {@link Stream}, see {@link SourceBuilder} instead. * * @category Stream */ export type Table = DictType> = Stream; /** @internal */ export declare function isTabularType(type: EastType): type is DictType; /** @internal */ export declare function isTabularArrayType(type: EastType): type is ArrayType; /** @internal */ export type TypeToFields> = { [K in keyof T["value"]["value"]["value"]]: Variable; }; /** @internal */ export declare function typeToFields>(type: T, prefix?: string): TypeToFields; /** @internal */ export type ArrayToFields> = { [K in keyof T["value"]["value"]]: Variable; }; /** @internal */ export declare function arrayToFields>(type: T, prefix?: string): ArrayToFields; /** @internal */ export type TypeToFieldNames> = { [K in keyof T["value"]["value"]["value"]]: K; }; /** @internal */ export declare function typeToFieldNames>(type: T, prefix?: string): TypeToFieldNames; /** @internal */ export type ArrayToFieldNames> = { [K in keyof T["value"]["value"]]: K; }; /** @internal */ export declare function arrayToFieldNames>(type: T, prefix?: string): ArrayToFieldNames; /** @internal */ export type StructToFields = { [K in keyof T["value"]]: Variable; }; /** @internal */ export declare function structToFields(type: T, prefix?: string): StructToFields; /** @internal */ export type FieldsToType> = DictType>; /** @internal */ export declare function fieldsToType(fields: Record): DictType; /** @internal */ export declare function fieldsToStruct(fields: Record): StructType; /** @internal */ export declare function normalizeVariables(fields: Record): { [k: string]: Variable; };