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

Better types definitions to avoid casting as unknown #22

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

folkvir
Copy link
Collaborator

@folkvir folkvir commented Mar 11, 2021

In the title, related to #20

Allows to do: const b: BloomFilter = BloomFilter.fromJSON(bloomJSON) as BloomFilter
Instead of doing this ...: const b: BloomFilter = BloomFilter.fromJSON(bloomJSON) as unknown as BloomFilter

Edit: see #20 (comment)

@folkvir folkvir requested a review from Callidon March 11, 2021 19:14
@folkvir folkvir self-assigned this Mar 11, 2021
@Callidon Callidon merged commit e6d9854 into master Mar 17, 2021
@Callidon Callidon deleted the type_definitions branch March 17, 2021 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants