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

Add decodeType to Appendable api #56

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

friendlymatthew
Copy link
Collaborator

@friendlymatthew friendlymatthew commented Jan 22, 2024

To enforce type validation for the demo's query, we needed a function that can decode the bitmask value into it's respective field rank.
Screen Shot 2024-01-22 at 1 05 44 PM

I figured it would be nice to have this in the API, as other people can directly call db.decodeType(fieldType).

Wrote tests

src/database.ts Outdated Show resolved Hide resolved
@friendlymatthew friendlymatthew marked this pull request as ready for review January 22, 2024 18:23
Copy link
Owner

@kevmo314 kevmo314 left a comment

Choose a reason for hiding this comment

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

Nice work figuring this out! There's a bit of a simpler way to check the type that maybe we can take advantage of?

examples/client/index.html Outdated Show resolved Hide resolved
@friendlymatthew friendlymatthew merged commit 800b5b3 into kevmo314:main Jan 22, 2024
2 checks passed
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.

2 participants