Procedure overview
Added in v1.0.0
Table of contents
combinator
compile
Signature
export declare const compile: <
I extends Record<string, Parameter.Parameter<any>>,
O extends Record<string, Parameter.Parameter<any>>,
A
>(
self: Procedure<I, O, A>
) => (input: Procedure.ParametersRecord<I>) => ProcedureWithValues<I, O, A>
Added in v1.0.0
outputParam
Signature
export declare const outputParam: <A>() => <N extends string, T extends DataType>(
name: N,
type: T,
options?: ParameterOptions
) => <I extends Record<string, Parameter.Parameter<any>>, O extends Record<string, Parameter.Parameter<any>>>(
self: Procedure<I, O>
) => Procedure<I, Simplify<O & { [K in N]: Parameter.Parameter<A> }>>
Added in v1.0.0
param
Signature
export declare const param: <A>() => <N extends string, T extends DataType>(
name: N,
type: T,
options?: ParameterOptions
) => <I extends Record<string, Parameter.Parameter<any>>, O extends Record<string, Parameter.Parameter<any>>>(
self: Procedure<I, O>
) => Procedure<Simplify<I & { [K in N]: Parameter.Parameter<A> }>, O>
Added in v1.0.0
withRows
Signature
export declare const withRows: <A extends object = Row>() => <
I extends Record<string, Parameter.Parameter<any>>,
O extends Record<string, Parameter.Parameter<any>>
>(
self: Procedure<I, O>
) => Procedure<I, O, A>
Added in v1.0.0
constructor
make
Signature
export declare const make: (name: string) => Procedure<{}, {}>
Added in v1.0.0
model
Procedure (interface)
Signature
export interface Procedure<
I extends Record<string, Parameter.Parameter<any>>,
O extends Record<string, Parameter.Parameter<any>>,
A = never
> extends Pipeable {
readonly [TypeId]: {
readonly _A: Covariant<A>
}
readonly _tag: "Procedure"
readonly name: string
readonly params: I
readonly outputParams: O
}
Added in v1.0.0
ProcedureWithValues (interface)
Signature
export interface ProcedureWithValues<
I extends Record<string, Parameter.Parameter<any>>,
O extends Record<string, Parameter.Parameter<any>>,
A
> extends Procedure<I, O, A> {
readonly values: Procedure.ParametersRecord<I>
}
Added in v1.0.0
type id
TypeId
Signature
export declare const TypeId: typeof TypeId
Added in v1.0.0
TypeId (type alias)
Signature
export type TypeId = typeof TypeId
Added in v1.0.0
utils
Procedure (namespace)
Added in v1.0.0
Result (interface)
Signature
export interface Result<O extends Record<string, Parameter.Parameter<any>>, A> {
readonly output: ParametersRecord<O>
readonly rows: ReadonlyArray<A>
}
Added in v1.0.0
ParametersRecord (type alias)
Signature
export type ParametersRecord<A extends Record<string, Parameter.Parameter<any>>> = {
readonly [K in keyof A]: A[K] extends Parameter.Parameter<infer T> ? T : never
} & {}
Added in v1.0.0