You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{pipe}from'fp-ts/function';import*astfrom'io-ts';import{NonEmptyArrayC,readonlyNonEmptyArray,ReadonlyNonEmptyArrayC,}from'io-ts-types';typeLenghtUpTo1000Brand={readonlyLenghtUpTo1000: unique symbol;};constLengthUpTo1000=<Cextends|t.ArrayType<t.Mixed>|t.ReadonlyArrayType<t.Mixed>|NonEmptyArrayC<t.Mixed>|ReadonlyNonEmptyArrayC<t.Mixed>>(codec: C)=>t.brand(codec,(a): a is t.Branded<t.TypeOf<C>,LenghtUpTo1000Brand>=>a.length<=1000,'LenghtUpTo1000');exportconstDataCodec=pipe(t.array(t.string),LengthUpTo1000);exportconstDataCodec2=pipe(t.readonlyArray(t.string),LengthUpTo1000);exportconstDataCodec3=pipe(readonlyNonEmptyArray(t.string),LengthUpTo1000);// <- error
Any ideas?
The text was updated successfully, but these errors were encountered:
I want to be able to chain codecs in a pipeline.
That doesn't work.
Any ideas?
The text was updated successfully, but these errors were encountered: