-
-
Notifications
You must be signed in to change notification settings - Fork 616
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
In the example given for TaggedUnion
, it demonstrates creating a Tagged
type
The demonstration given is type Tagged<Fields extends Record<string, unknown>> = TaggedUnion<'type', Fields>
. This makes sense to me as expected behaviour, given the descriptions.
However, even this example fails, with the error "Type 'Fields' does not satisfy the constraint 'Record<string, Record<string, unknown>>'."
It looks like there's a redundant level of Record
wrapping the type constraint on TaggedUnion, but even if that's intentional, the example doesn't clarify intended use.
Repro
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working