- TaggedRequest<Self>(): (<Tag, Fields, EI, EA, AI, AA>(tag, failure, success, fields) => [unknown] extends [Self]
? "Missing `Self` generic - use `class Self extends TaggedRequest<Self>()(\"Tag\", SuccessSchema, FailureSchema, { ... })`"
: S.Class<Simplify<{
_tag: Tag;
} & {
readonly [K in string | number | symbol]: From<Fields[K]>
} & {
readonly [K_1 in string | number | symbol]?: From<Fields[K_1]>
}>, Simplify<{
_tag: Tag;
} & {
readonly [K_2 in string | number | symbol]: To<Fields[K_2]>
} & {
readonly [K_3 in string | number | symbol]?: To<Fields[K_3]>
}>, Simplify<ToStruct<Fields>>, Self, Request<EA, AA>> & ResultSchemas<EI, EA, AI, AA>) Returns (<Tag, Fields, EI, EA, AI, AA>(tag, failure, success, fields) => [unknown] extends [Self]
? "Missing `Self` generic - use `class Self extends TaggedRequest<Self>()(\"Tag\", SuccessSchema, FailureSchema, { ... })`"
: S.Class<Simplify<{
_tag: Tag;
} & {
readonly [K in string | number | symbol]: From<Fields[K]>
} & {
readonly [K_1 in string | number | symbol]?: From<Fields[K_1]>
}>, Simplify<{
_tag: Tag;
} & {
readonly [K_2 in string | number | symbol]: To<Fields[K_2]>
} & {
readonly [K_3 in string | number | symbol]?: To<Fields[K_3]>
}>, Simplify<ToStruct<Fields>>, Self, Request<EA, AA>> & ResultSchemas<EI, EA, AI, AA>)
- <Tag, Fields, EI, EA, AI, AA>(tag, failure, success, fields): [unknown] extends [Self]
? "Missing `Self` generic - use `class Self extends TaggedRequest<Self>()(\"Tag\", SuccessSchema, FailureSchema, { ... })`"
: S.Class<Simplify<{
_tag: Tag;
} & {
readonly [K in string | number | symbol]: From<Fields[K]>
} & {
readonly [K_1 in string | number | symbol]?: From<Fields[K_1]>
}>, Simplify<{
_tag: Tag;
} & {
readonly [K_2 in string | number | symbol]: To<Fields[K_2]>
} & {
readonly [K_3 in string | number | symbol]?: To<Fields[K_3]>
}>, Simplify<ToStruct<Fields>>, Self, Request<EA, AA>> & ResultSchemas<EI, EA, AI, AA> Type Parameters
Tag extends string
EI
EA
AI
AA
Parameters
tag: Tag
failure: Schema<EI, EA>
success: Schema<AI, AA>
fields: Fields
Returns [unknown] extends [Self]
? "Missing `Self` generic - use `class Self extends TaggedRequest<Self>()(\"Tag\", SuccessSchema, FailureSchema, { ... })`"
: S.Class<Simplify<{
_tag: Tag;
} & {
readonly [K in string | number | symbol]: From<Fields[K]>
} & {
readonly [K_1 in string | number | symbol]?: From<Fields[K_1]>
}>, Simplify<{
_tag: Tag;
} & {
readonly [K_2 in string | number | symbol]: To<Fields[K_2]>
} & {
readonly [K_3 in string | number | symbol]?: To<Fields[K_3]>
}>, Simplify<ToStruct<Fields>>, Self, Request<EA, AA>> & ResultSchemas<EI, EA, AI, AA>
Since
1.0.0