GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — More did-you-mean errors on classes in plain JS by sandersn · Pull Request #49827 · microsoft/TypeScript Conversation
Member
Classes
Now provide spelling suggestions on misspelled property accesses. Because of JS support for assignment-as-declaration, it's still easy to mistakenly declare a property with a typo and not get any suggestions. I'm not sure this is a great idea; I'm going to run user tests and see how they look. Fixes #45479
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Classes - that are declared with class declarations or expressions, but not constructor functions - and which have nothing in their heritage clauses Now provide spelling suggestions on misspelled property accesses. Because of JS support for assignment-as-declaration, it's still easy to mistakenly declare a property with a typo and not get any suggestions.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Heya Nathan Shively-Sanders (@sandersn), I've started to run the diff-based user code test suite on this PR at c850390. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Nathan Shively-Sanders (@sandersn), I've started to run the parallelized Definitely Typed test suite on this PR at c850390. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nathan Shively-Sanders (@sandersn) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
TODO: This should probably skip decorated classes too |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Since decorators can introduce arbitrary properties
|
TypeScript Bot (@typescript-bot) test top100 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Nathan Shively-Sanders (@sandersn), I've started to run the diff-based top-repos suite on this PR at ce47269. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Nathan Shively-Sanders (@sandersn), I've started to run the diff-based user code test suite on this PR at ce47269. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think this is ready to review, but unless I can think of a better way to test it, I don't want to put it in 5.2 beta; right now my testing plan is to have real people to use and complain if the errors are too much. Any other ideas? I guess I could artificially turn this on for more file types, but I don't know of any good source of code with typos in it. Maybe I could download random npm packages. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nathan Shively-Sanders (@sandersn) Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Something interesting changed - please have a look. Details
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This seems fairly conservative, and I can’t think of a great way to test it on real code, since typos tend to get fixed eventually.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nathan Shively-Sanders (@sandersn) Here are the results of running the top-repos suite comparing Everything looks good! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeah, I agree. I'll merge it when 5.3 development starts. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Later: Or, it turns out, just before it ends. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
No suggestion diagnostic for unchecked JS files in method from class
There was an error while loading. Please reload this page.