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

Support symbols or strings as milestone keys #12

Merged
merged 1 commit into from
Sep 10, 2018
Merged

Conversation

dfreeman
Copy link
Member

@dfreeman dfreeman commented Sep 5, 2018

Per #9, this allows for the use of symbols as milestone keys. In terms of the actual runtime code, there were only a couple of small changes to the implementation:

  • We had a couple uses of Object.keys that had to be replaced with something more generic, as that only returns string keys
  • We were interpolating keys directly into strings in places, which will blow up as symbols don't like to be implicitly coerced to strings, so there are now some explicit .toString() calls (thanks TypeScript, I would have forgotten about that!)

One note: TS doesn't currently allow symbols in an index type (i.e. { [key: symbol]: any } isn't a thing), so there's a few as anys sprinkled in to bypass that. If microsoft/TypeScript#26797 lands, we ought to be able to clean that up.

@deverstalmage

@dfreeman dfreeman merged commit 671da8c into master Sep 10, 2018
@dfreeman dfreeman deleted the symbol-keys branch September 10, 2018 17:05
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