type Validator = 'a' | 'b' | 'c';
type Result = 'loading' | 'pass' | 'fail'
// Stream<never, never, T> is abbrevated to Stream<T> for simplicity.
declare const validationProgram: (input: Stream<string>) => Stream<Record<Validator, Result>>
// Example
// input: x ------ start validate('a', x') validate('b', x) validate('c', x) in parallel
// output: { a: 'loading', b: 'loading', c: 'loading' }
// ...
// output: { a: 'loading', b: 'pass', c: 'loading' }
// input: y ----- cancel validate('a', x) and validate('c', x) and start over with y
// output: { a: 'loading', b: 'loading', c: 'loading' }
// ...
// output: { a: 'loading', b: 'pass', c: 'loading' }
// ...
// output: { a: 'fail' , b: 'pass', c: 'loading' }
// ...
// output: { a: 'fail' , b: 'pass', c: 'pass' }
type Validator = 'a' | 'b' | 'c';
type Result = 'loading' | 'pass' | 'fail'
// Stream<never, never, T> is abbrevated to Stream<T> for simplicity.
declare const validationProgram: (input: Stream<string>) => Stream<Record<Validator, Result>>
// Example
// input: x ------ start validate('a', x') validate('b', x) validate('c', x) in parallel
// output: { a: 'loading', b: 'loading', c: 'loading' }
// ...
// output: { a: 'loading', b: 'pass', c: 'loading' }
// input: y ----- cancel validate('a', x) and validate('c', x) and start over with y
// output: { a: 'loading', b: 'loading', c: 'loading' }
// ...
// output: { a: 'loading', b: 'pass', c: 'loading' }
// ...
// output: { a: 'fail' , b: 'pass', c: 'loading' }
// ...
// output: { a: 'fail' , b: 'pass', c: 'pass' }