export type IsHumanModalClosed = {
_tag: 'closed'
}
export type IsHumanModalOpened = {
_tag: 'open'
challenge: string
}
export type IsHumanModalState = IsHumanModalClosed | IsHumanModalOpened
const isHumanModalStateMatcher = <T>(params: {
closed: (closed: IsHumanModalClosed) => T
open: (open: IsHumanModalOpened) => T
}) =>
pipe(
Match.type<IsHumanModalState>(),
Match.tag('closed', params.closed),
Match.tag('open', params.open),
Match.exhaustive
)
export type IsHumanModalClosed = {
_tag: 'closed'
}
export type IsHumanModalOpened = {
_tag: 'open'
challenge: string
}
export type IsHumanModalState = IsHumanModalClosed | IsHumanModalOpened
const isHumanModalStateMatcher = <T>(params: {
closed: (closed: IsHumanModalClosed) => T
open: (open: IsHumanModalOpened) => T
}) =>
pipe(
Match.type<IsHumanModalState>(),
Match.tag('closed', params.closed),
Match.tag('open', params.open),
Match.exhaustive
)