( tag: Tag )
| 89 | * @since 2.0.0 |
| 90 | */ |
| 91 | export const TaggedClass = <Tag extends string>( |
| 92 | tag: Tag |
| 93 | ): new<A extends Record<string, any> = {}>( |
| 94 | args: Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }> |
| 95 | ) => Readonly<A> & { readonly _tag: Tag } & Pipeable.Pipeable => |
| 96 | class extends Class { |
| 97 | readonly _tag = tag |
| 98 | } as any |
| 99 | |
| 100 | /** |
| 101 | * Transforms a record of variant definitions into a discriminated union type. |
nothing calls this directly
no outgoing calls
no test coverage detected