TypeScript/src/services
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
..
codefixes Fix unassignable properties by adding undefined with exactOptionalPropertyTypes (#45032) 2021-08-10 16:57:38 -07:00
formatting fix(44637): add spaces between exports assignment equal token (#44655) 2021-06-18 16:37:41 -07:00
refactors Fix typo in helpers.ts (#45365) 2021-08-09 08:40:54 -07:00
breakpoints.ts feat(eslint): consistent-type-assertions (#43556) 2021-05-18 06:20:57 -07:00
callHierarchy.ts Proposal class static block support (#43370) 2021-06-25 09:24:05 -07:00
classifier.ts Simplify or optimize regexes with polynomial time worst cases (#44197) 2021-05-24 15:28:52 -07:00
classifier2020.ts Do not classify Infinity and NaN (#44778) 2021-08-04 10:00:39 +01:00
codeFixProvider.ts --noImplicitOverride (#39669) 2021-03-26 16:29:22 -07:00
completions.ts Fix completions in return when in function with contextual 'this' (#45340) 2021-08-05 22:40:20 -07:00
documentHighlights.ts redirectsTarget is keyed with Path (#44278) 2021-05-26 16:50:14 -07:00
documentRegistry.ts Handle document Registry to distinguish between files with same name and document registry key(compiler options affecting source file) but different ScriptKind (#43474) 2021-04-05 13:27:34 -07:00
exportAsModule.ts Refactor: No more than 1 namespace declaration per file (#35373) 2019-11-27 13:44:31 -08:00
exportInfoMap.ts Store symbol table map key in CachedSymbolExportInfo (#45289) 2021-08-04 16:31:47 -07:00
findAllReferences.ts Change static fields emits (#43114) 2021-06-25 15:49:27 -07:00
getEditsForFileRename.ts getEditsForFileRename: fix updateTsconfigFiles w/ empty include 2021-06-21 13:38:54 -04:00
globalThisShim.ts Move codefix types into services/types.ts (#35506) 2019-12-05 10:51:31 -08:00
goToDefinition.ts feat(44736): add go-to-definition on overridden members (#44740) 2021-06-28 14:58:06 -07:00
importTracker.ts Improve errors for incorrectly nested export default (#43967) 2021-05-07 08:09:38 -07:00
inlayHints.ts fix(45393): show parameter name hints for unary literal expressions (#45399) 2021-08-10 11:51:00 -07:00
jsDoc.ts Skip typedef in services getJSDocTags (#43677) 2021-06-23 16:19:14 -07:00
navigateTo.ts feat(eslint): consistent-type-assertions (#43556) 2021-05-18 06:20:57 -07:00
navigationBar.ts Change static fields emits (#43114) 2021-06-25 15:49:27 -07:00
organizeImports.ts Added skipDestructiveCodeActions argument to organize imports server command (#43184) 2021-04-20 09:04:17 -07:00
outliningElementsCollector.ts fix(44812): add outlining spans for comments inside blocks (#44847) 2021-07-30 15:56:32 -07:00
patternMatcher.ts Merge branch 'master' into migrateMapsAndSets 2020-07-07 13:53:46 -07:00
preProcess.ts Handle import type and export type in preprocess (#37508) 2020-03-23 10:11:01 -07:00
refactorProvider.ts Hierarchical refactorings (#41975) 2020-12-23 12:50:03 -08:00
rename.ts fix(43559): allow renaming in files with no-default-lib enabled (#43579) 2021-04-23 16:56:33 -07:00
services.ts Fix getChildCount/At methods in EndOfFileTokens (#44991) 2021-07-30 09:03:19 -07:00
shims.ts Add inlay hints support (#42089) 2021-06-24 23:06:34 -07:00
signatureHelp.ts Fix the code that checks for variadic signatures 2021-05-20 09:27:57 -04:00
smartSelection.ts feat(42735): add single line comments to selection ranges (#42763) 2021-02-11 17:14:55 -08:00
sourcemaps.ts Migrate more places to use Map/Set 2020-06-26 10:15:53 -07:00
stringCompletions.ts fix(44837): add graceful recovery for require completions (#45151) 2021-07-26 15:26:43 -07:00
suggestionDiagnostics.ts fix(44123): forbid convert to async for generator callbacks (#44147) 2021-05-28 14:42:09 -07:00
symbolDisplay.ts fix(43796): Sort @deprecated completions lower than others (#43880) 2021-05-18 13:55:00 -07:00
textChanges.ts fix(44465): remove only unused declarations instead of the entire line (#44490) 2021-06-18 16:20:34 -07:00
transform.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
transpile.ts feat(eslint): consistent-type-assertions (#43556) 2021-05-18 06:20:57 -07:00
tsconfig.json Fix unassignable properties by adding undefined with exactOptionalPropertyTypes (#45032) 2021-08-10 16:57:38 -07:00
types.ts Refactor export map cache to not store transient symbols (#44816) 2021-07-06 11:04:59 -06:00
utilities.ts Fix unassignable properties by adding undefined with exactOptionalPropertyTypes (#45032) 2021-08-10 16:57:38 -07:00