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 support for numbers as map keys #84

Merged
merged 1 commit into from
Aug 30, 2019
Merged

Conversation

sergeyzenchenko
Copy link
Collaborator

No description provided.

@@ -12,10 +12,18 @@ const enum State {
MAP_VALUE,
}

type MapKeyType = string | number;

const isValidMapKeyType = (key: unknown): key is MapKeyType => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe we don't need this function and I can just put it into if. It just looks better :)

This function should not affect performance because it's very small and will be inlined

Copy link
Member

@gfx gfx left a comment

Choose a reason for hiding this comment

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

Cool. Looks good enough fow now.

@codecov-io
Copy link

codecov-io commented Aug 30, 2019

Codecov Report

Merging #84 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   98.33%   98.33%   +<.01%     
==========================================
  Files          16       16              
  Lines         959      962       +3     
  Branches      194      195       +1     
==========================================
+ Hits          943      946       +3     
  Misses         16       16
Impacted Files Coverage Δ
src/Decoder.ts 99.13% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efff31d...38e2c91. Read the comment docs.

@sergeyzenchenko sergeyzenchenko merged commit 695f3b4 into master Aug 30, 2019
@sergeyzenchenko sergeyzenchenko deleted the fix-map-keys-decoding branch August 30, 2019 08:48
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