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

Don't provide completions after = in JSX #21341

Closed
ghost opened this issue Jan 22, 2018 · 1 comment · Fixed by #21372
Closed

Don't provide completions after = in JSX #21341

ghost opened this issue Jan 22, 2018 · 1 comment · Fixed by #21372
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Jan 22, 2018

TypeScript Version: 2.7.0-dev.20180122

Code

<div foo=

Expected behavior:

No completions. This is not a valid location for an identifier, only a string literal, jsx expression, or {}.

Actual behavior:

Get global completions.

@ghost ghost self-assigned this Jan 22, 2018
@jwbay
Copy link
Contributor

jwbay commented Jan 23, 2018

It would be awesome if completions worked here, but it wrapped the identifier in curlies for you when it inserts:

<div foo=/* request completions, select a local onClick function and you get */
<div foo={onClick}

Just a thought 🤷‍♂️

@mhegazy mhegazy added the Bug A bug in TypeScript label Jan 24, 2018
@ghost ghost closed this as completed in #21372 Jan 25, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Jan 25, 2018
@mhegazy mhegazy added this to the TypeScript 2.7.1 milestone Jan 25, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants