Nathan Shively-Sanders 8d4fe5a0fb
Fix unassignable properties by adding undefined with exactOptionalPropertyTypes (#45032)
* Simple first version

Doesn't cover or test any complicated variations.

* Lots of cases work

Destructuring does not. But

- skipping node_modules and lib.* does.
- call expressions does
- property access, including with private identifiers, does

* Support variable declarations, property assignments, destructuring

As long as it's not nested

* More cleanup

* skip all d.ts, not just node_modules/lib

* Offer a codefix for a lot more cases

* remove incorrect tuple check

* Use getSymbolId instead of converting to string

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

* add test + switch to tracking number symbol ids

* Address PR comments

* Exclude tuples from suggestion

* Better way to get error node

Plus add a check that errorNode is an argument to the call, not the
call's expression.

* fix semicolon lint

* fix another crash

* Simplify: add undefined to all optional propertie

whether or not somebody tried to assign undefined to them in the
erroneous assignment

* remove fix-all

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2021-08-10 16:57:38 -07:00
..
2020-06-03 12:59:16 -04:00
2020-07-09 18:35:54 -07:00
2021-06-10 14:12:33 -07:00
2020-06-17 22:41:08 +08:00
2020-09-09 10:45:09 -07:00
2020-09-09 10:45:09 -07:00
2020-09-09 10:45:09 -07:00
2020-06-18 10:33:17 +08:00
2020-05-26 19:26:28 -07:00
2020-05-26 19:26:28 -07:00
2020-05-26 19:26:28 -07:00
2020-05-22 16:46:32 -07:00
2020-05-22 16:46:32 -07:00
2020-05-22 16:47:35 -07:00
2020-05-26 19:26:28 -07:00