TypeScript/src/services/tsconfig.json
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

138 lines
5.4 KiB
JSON

{
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/services.js"
},
"references": [
{ "path": "../shims" },
{ "path": "../compiler" },
{ "path": "../jsTyping" }
],
"files": [
"types.ts",
"utilities.ts",
"exportInfoMap.ts",
"classifier.ts",
"classifier2020.ts",
"stringCompletions.ts",
"completions.ts",
"documentHighlights.ts",
"documentRegistry.ts",
"importTracker.ts",
"findAllReferences.ts",
"callHierarchy.ts",
"getEditsForFileRename.ts",
"goToDefinition.ts",
"jsDoc.ts",
"navigateTo.ts",
"navigationBar.ts",
"organizeImports.ts",
"getEditsForFileRename.ts",
"outliningElementsCollector.ts",
"patternMatcher.ts",
"preProcess.ts",
"rename.ts",
"smartSelection.ts",
"signatureHelp.ts",
"inlayHints.ts",
"sourcemaps.ts",
"suggestionDiagnostics.ts",
"symbolDisplay.ts",
"transpile.ts",
"formatting/formattingContext.ts",
"formatting/formattingScanner.ts",
"formatting/rule.ts",
"formatting/rules.ts",
"formatting/rulesMap.ts",
"formatting/formatting.ts",
"formatting/smartIndenter.ts",
"textChanges.ts",
"codeFixProvider.ts",
"refactorProvider.ts",
"codefixes/addConvertToUnknownForNonOverlappingTypes.ts",
"codefixes/addEmptyExportDeclaration.ts",
"codefixes/addMissingAsync.ts",
"codefixes/addMissingAwait.ts",
"codefixes/addMissingConst.ts",
"codefixes/addMissingDeclareProperty.ts",
"codefixes/addMissingInvocationForDecorator.ts",
"codefixes/addNameToNamelessParameter.ts",
"codefixes/addOptionalPropertyUndefined.ts",
"codefixes/annotateWithTypeFromJSDoc.ts",
"codefixes/convertFunctionToEs6Class.ts",
"codefixes/convertToAsyncFunction.ts",
"codefixes/convertToEs6Module.ts",
"codefixes/correctQualifiedNameToIndexedAccessType.ts",
"codefixes/convertToTypeOnlyExport.ts",
"codefixes/convertToTypeOnlyImport.ts",
"codefixes/convertLiteralTypeToMappedType.ts",
"codefixes/fixClassIncorrectlyImplementsInterface.ts",
"codefixes/importFixes.ts",
"codefixes/fixOverrideModifier.ts",
"codefixes/fixNoPropertyAccessFromIndexSignature.ts",
"codefixes/fixImplicitThis.ts",
"codefixes/fixIncorrectNamedTupleSyntax.ts",
"codefixes/fixSpelling.ts",
"codefixes/returnValueCorrect.ts",
"codefixes/fixAddMissingMember.ts",
"codefixes/fixAddMissingNewOperator.ts",
"codefixes/fixCannotFindModule.ts",
"codefixes/fixClassDoesntImplementInheritedAbstractMember.ts",
"codefixes/fixClassSuperMustPrecedeThisAccess.ts",
"codefixes/fixConstructorForDerivedNeedSuperCall.ts",
"codefixes/fixEnableExperimentalDecorators.ts",
"codefixes/fixEnableJsxFlag.ts",
"codefixes/fixModuleAndTargetOptions.ts",
"codefixes/fixPropertyAssignment.ts",
"codefixes/fixExtendsInterfaceBecomesImplements.ts",
"codefixes/fixForgottenThisPropertyAccess.ts",
"codefixes/fixInvalidJsxCharacters.ts",
"codefixes/fixUnusedIdentifier.ts",
"codefixes/fixUnreachableCode.ts",
"codefixes/fixUnusedLabel.ts",
"codefixes/fixJSDocTypes.ts",
"codefixes/fixMissingCallParentheses.ts",
"codefixes/fixAwaitInSyncFunction.ts",
"codefixes/fixPropertyOverrideAccessor.ts",
"codefixes/inferFromUsage.ts",
"codefixes/fixReturnTypeInAsyncFunction.ts",
"codefixes/disableJsDiagnostics.ts",
"codefixes/helpers.ts",
"codefixes/generateAccessors.ts",
"codefixes/fixInvalidImportSyntax.ts",
"codefixes/fixStrictClassInitialization.ts",
"codefixes/requireInTs.ts",
"codefixes/useDefaultImport.ts",
"codefixes/useBigintLiteral.ts",
"codefixes/fixAddModuleReferTypeMissingTypeof.ts",
"codefixes/wrapJsxInFragment.ts",
"codefixes/convertToMappedObjectType.ts",
"codefixes/removeAccidentalCallParentheses.ts",
"codefixes/removeUnnecessaryAwait.ts",
"codefixes/splitTypeOnlyImport.ts",
"codefixes/convertConstToLet.ts",
"codefixes/fixExpectedComma.ts",
"codefixes/fixAddVoidToPromise.ts",
"refactors/convertExport.ts",
"refactors/convertImport.ts",
"refactors/convertToOptionalChainExpression.ts",
"refactors/convertOverloadListToSingleSignature.ts",
"refactors/extractSymbol.ts",
"refactors/extractType.ts",
"refactors/generateGetAccessorAndSetAccessor.ts",
"refactors/helpers.ts",
"refactors/moveToNewFile.ts",
"refactors/addOrRemoveBracesToArrowFunction.ts",
"refactors/convertParamsToDestructuredObject.ts",
"refactors/convertStringOrTemplateLiteral.ts",
"refactors/convertArrowFunctionOrFunctionExpression.ts",
"refactors/inferFunctionReturnType.ts",
"services.ts",
"breakpoints.ts",
"transform.ts",
"shims.ts",
"globalThisShim.ts",
"exportAsModule.ts"
]
}