close
Skip to content

Add support for numbers as map keys#84

Merged
sergeyzenchenko merged 1 commit intomasterfrom
fix-map-keys-decoding
Aug 30, 2019
Merged

Add support for numbers as map keys#84
sergeyzenchenko merged 1 commit intomasterfrom
fix-map-keys-decoding

Conversation

@sergeyzenchenko
Copy link
Copy Markdown
Collaborator

No description provided.

@sergeyzenchenko sergeyzenchenko requested a review from gfx August 30, 2019 08:39
Comment thread src/Decoder.ts

type MapKeyType = string | number;

const isValidMapKeyType = (key: unknown): key is MapKeyType => {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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