Thanks to visit codestin.com
Credit goes to effect-ts.github.io

Skip to main content Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

Procedure.ts overview

Since v1.0.0


Exports Grouped by Category


combinator

compile

Signature

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>

Source

Since v1.0.0

outputParam

Signature

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> }>>

Source

Since v1.0.0

param

Signature

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>

Source

Since v1.0.0

withRows

Signature

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>

Source

Since v1.0.0

constructor

make

Signature

declare const make: (name: string) => Procedure<{}, {}>

Source

Since 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
}

Source

Since 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>
}

Source

Since v1.0.0

type id

TypeId

Signature

declare const TypeId: unique symbol

Source

Since v1.0.0

TypeId (type alias)

Signature

type TypeId = typeof TypeId

Source

Since v1.0.0

utils

Procedure (namespace)

Source

Since 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>
}

Source

Since v1.0.0

ParametersRecord (type alias)

Signature

type { readonly [K in keyof A]: A[K] extends Parameter.Parameter<infer T> ? T : never; } = & {
      readonly [K in keyof A]: A[K] extends Parameter.Parameter<infer T> ? T
        : never
    }
    & {}

Source

Since v1.0.0