Skip to content
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

Merged
merged 1 commit into from
Aug 17, 2022
Merged

docs: update #76

merged 1 commit into from
Aug 17, 2022

Conversation

tjjfvi
Copy link
Owner

@tjjfvi tjjfvi commented Aug 16, 2022

Fixes #64

@@ -268,17 +268,16 @@ export class CodecVisitor<R> {
}

/**
* Once Deno releases with TS 4.7, this can be used like so:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happened

Comment on lines -273 to +272
* visitor.generic((visitor) => <T>() =>
* visitor.generic(<T>() =>
Copy link
Owner Author

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>> {
Copy link
Owner Author

@tjjfvi tjjfvi Aug 16, 2022

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];
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed bug in typing

@tjjfvi tjjfvi merged commit f65b508 into main Aug 17, 2022
@tjjfvi tjjfvi deleted the update-docs branch August 17, 2022 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for Metadata & Visitors
2 participants