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

Number literal object keys variance annotation parsing #7798

Closed
wants to merge 4 commits into from

Conversation

goodmind
Copy link
Contributor

@goodmind goodmind commented Jun 7, 2019

Related #7593

It's impossible to have negative number key, so it can only mean contravariant annotation

const bar = {-1: 'foo'}

VM153:1 Uncaught SyntaxError: Unexpected token -
type X = {-1: T}
type X = {+1: T}
type X = {1: T}

@goodmind
Copy link
Contributor Author

goodmind commented Jul 2, 2019

@mroch I think this is related to number keys and #380

@goodmind goodmind changed the title Number literal object keys parsing Number literal object keys variance annotation parsing Jul 2, 2019
@goodmind
Copy link
Contributor Author

@mroch can you look into this?

@goodmind goodmind added the Stalled Issues and PRs that are stalled. label Jul 27, 2019
@goodmind goodmind removed the Stalled Issues and PRs that are stalled. label Sep 24, 2019
@gkz gkz closed this Dec 6, 2023
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.

3 participants