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

Expose TaggedRecord #70

Merged
merged 1 commit into from
Feb 14, 2020
Merged

Conversation

OliverJAsh
Copy link
Collaborator

This would be useful when defining custom predicates, e.g.

const T = unionize({
  foo: ofType<{ x: number }>(),
});
type ActionType = UnionOf<typeof T>;
type TaggedRecord = TaggedRecordOf<typeof T>;

const isFooAndXIs1 = (action: ActionType): action is TaggedRecord['foo'] =>
  T.is.foo(action) && action.x === 1;

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8f30ae8 on OliverJAsh:oja/tagged-record into 8c9ccde on pelotom:master.

Copy link
Owner

@pelotom pelotom left a comment

Choose a reason for hiding this comment

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

LGTM

@pelotom pelotom merged commit ca91891 into pelotom:master Feb 14, 2020
@OliverJAsh
Copy link
Collaborator Author

OliverJAsh commented Feb 14, 2020

Thanks! Would you mind doing a release cycle? Or I can do it if you tell me how? 😄

@OliverJAsh
Copy link
Collaborator Author

@pelotom If you're not using this module anymore, I fear my change may never be released! If you could give me npm access then I can coordinate releases myself?

@pelotom
Copy link
Owner

pelotom commented Feb 26, 2020

@OliverJAsh sorry for the delay, been swamped. I can do a release but aren't you already a maintainer?
image

@pelotom
Copy link
Owner

pelotom commented Feb 26, 2020

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.

3 participants