-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update #76
docs: update #76
Conversation
@@ -268,17 +268,16 @@ export class CodecVisitor<R> { | |||
} | |||
|
|||
/** | |||
* Once Deno releases with TS 4.7, this can be used like so: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happened
* visitor.generic((visitor) => <T>() => | ||
* visitor.generic(<T>() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit cleaner IMO; didn't really like putting the old version into the docs
|
||
export function spread<A, B>($a: Codec<A>, $b: Codec<B>): Codec<A & B> { | ||
export function spread<A, B>($a: Codec<A>, $b: Codec<B>): Codec<Expand<A & B>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better hover
@@ -48,7 +48,7 @@ export type NativeTaggedUnionMember< | |||
export type NativeTaggedUnionMembers< | |||
TK extends PropertyKey, | |||
M extends Record<number, TaggedUnionMember>, | |||
> = { [K in keyof M]: NativeTaggedUnionMember<TK, M[K & number]> }[number]; | |||
> = { [K in keyof M]: NativeTaggedUnionMember<TK, Extract<M[K], TaggedUnionMember>> }[number]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed bug in typing
Fixes #64