TypeScript/src/services/codefixes
Anders Hejlsberg 0e905be42b
Index signatures for symbols and template literal strings (#44512)
* Switch index signature storage to 'indexInfos: IndexInfo[]' property

* Accept new baselines

* Remove another usage of IndexKind enum

* Update getIndexedAccessType and resolveMappedTypeMembers

* Accept new baselines

* Update grammar checking for index signatures

* Accept new baselines

* Consider all index signatures in mapped types and union types

* Accept new baselines

* Update getIndexType

* Accept new baselines

* Intersect multiple applicable index signatures

* Use getApplicableIndexInfo instead of hardwired string/number handling

* Update index signature relationship checking

* Report type for which index signature is missing

* Report type for which index signature is missing

* Accept new baselines

* Make 'number' index signatures consistently apply to numeric strings

* Accept new baselines

* Update fourslash test

* Revise index constraint checking

* Accept new baselines

* Update error messages

* Accept new baselines

* Update type inference from index signatures

* Update isKnownProperty

* Update contextual typing based on index signatures

* Accept new baselines

* Support union types in index signature declarations

* Accept new baselines

* Check duplicate index signatures / remove redundant template literals from unions with string

* Accept new baselines

* Include key type in diagnostic / check symbol-named properties

* Accept new baselines

* Minor fix

* Add tests

* Accept new baselines

* Add optimized findApplicableIndexInfoForName

* Accept new baselines

* Another place we don't need to obtain literal type for property name

* Accept new baselines

* Don't create literal types that are going to be discarded

* Individual maps for string, number, bigint, and enum literal types

* Remove ineffective optimizations

* Accept new baselines

* Permit intersections as key types in index signatures

* Index expression in element access is template literal context

* Add tests

* Accept new baselines

* Symbol index signatures from object literals with computed symbol properties

* Accept new baselines

* Add more tests

* Accept new baselines

* Implement Go To Definition for all applicable index signatures

* Add fourslash test

* Accept new API baselines
2021-06-21 11:25:42 -07:00
..
addConvertToUnknownForNonOverlappingTypes.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
addEmptyExportDeclaration.ts Support top level "for await of" (#37424) 2021-01-25 13:40:45 -08:00
addMissingAsync.ts Switch to ES Map/Set internally (#33771) 2020-06-26 10:12:47 -07:00
addMissingAwait.ts Don’t error for missing await when promise is referenced in condition body (#43593) 2021-04-13 12:15:48 -07:00
addMissingConst.ts Migrate more places to use Map/Set 2020-06-26 10:15:53 -07:00
addMissingDeclareProperty.ts Migrate more places to use Map/Set 2020-06-26 10:15:53 -07:00
addMissingInvocationForDecorator.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
addNameToNamelessParameter.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
annotateWithTypeFromJSDoc.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
convertConstToLet.ts fix(44676): fix constToLetQuickFix selection range (#44677) 2021-06-21 11:22:24 -07:00
convertFunctionToEs6Class.ts Add undefined to Symbol.valueDeclaration (#43033) 2021-03-02 12:36:26 -08:00
convertLiteralTypeToMappedType.ts Template literal types and mapped type 'as' clauses (#40336) 2020-09-09 17:23:22 -10:00
convertToAsyncFunction.ts fix(43939): forbid converting getters to async/await (#43944) 2021-05-06 01:48:54 -07:00
convertToEs6Module.ts "fix(services): convert to es6 module generate invalid code with .default" (#43309) 2021-03-30 15:24:31 -07:00
convertToMappedObjectType.ts Index signatures for symbols and template literal strings (#44512) 2021-06-21 11:25:42 -07:00
convertToTypeOnlyExport.ts Fix duplicate auto-import completions (#42850) 2021-02-18 10:06:37 -08:00
convertToTypeOnlyImport.ts Allow type-only imports on ImportEqualsDeclarations (#41573) 2020-12-03 13:27:15 -08:00
correctQualifiedNameToIndexedAccessType.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
disableJsDiagnostics.ts Switch to ES Map/Set internally (#33771) 2020-06-26 10:12:47 -07:00
fixAddMissingMember.ts feat(28491): add QF to declare missing properties (#44576) 2021-06-17 11:12:29 -07:00
fixAddMissingNewOperator.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixAddModuleReferTypeMissingTypeof.ts feat(eslint): consistent-type-assertions (#43556) 2021-05-18 06:20:57 -07:00
fixAddVoidToPromise.ts Add quick fix to add 'void' to Promise resolved without value (#40558) 2020-09-14 19:12:33 -07:00
fixAwaitInSyncFunction.ts Fix duplicate auto-import completions (#42850) 2021-02-18 10:06:37 -08:00
fixCannotFindModule.ts Fix import fix on react or react dev (#41950) 2021-02-16 10:28:48 -08:00
fixClassDoesntImplementInheritedAbstractMember.ts Fix duplicate auto-import completions (#42850) 2021-02-18 10:06:37 -08:00
fixClassIncorrectlyImplementsInterface.ts Index signatures for symbols and template literal strings (#44512) 2021-06-21 11:25:42 -07:00
fixClassSuperMustPrecedeThisAccess.ts Fix duplicate auto-import completions (#42850) 2021-02-18 10:06:37 -08:00
fixConstructorForDerivedNeedSuperCall.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixEnableExperimentalDecorators.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixEnableJsxFlag.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixExpectedComma.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixExtendsInterfaceBecomesImplements.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixForgottenThisPropertyAccess.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixImplicitThis.ts Type this in more constructor functions (#39447) 2020-07-08 08:44:17 -07:00
fixIncorrectNamedTupleSyntax.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixInvalidImportSyntax.ts Index signatures for symbols and template literal strings (#44512) 2021-06-21 11:25:42 -07:00
fixInvalidJsxCharacters.ts fix(29881): infer quote preference for property access conversion in completions (#41041) 2020-10-13 10:06:27 -07:00
fixJSDocTypes.ts Harden node builder APIs to no longer return undefined for a node when NodeBuilderFlags.IgnoreErrors is provided (#38273) 2020-05-04 14:47:39 -07:00
fixMissingCallParentheses.ts Don’t error for missing await when promise is referenced in condition body (#43593) 2021-04-13 12:15:48 -07:00
fixModuleAndTargetOptions.ts Support top level "for await of" (#37424) 2021-01-25 13:40:45 -08:00
fixNoPropertyAccessFromIndexSignature.ts respect quote Preference 2020-12-03 12:00:30 +08:00
fixOverrideModifier.ts Update diagnostic message and quickfix for parameter property (#44010) 2021-05-08 23:22:20 -07:00
fixPropertyAssignment.ts feat(25259): change diagnostic message 2020-07-04 09:05:47 +03:00
fixPropertyOverrideAccessor.ts fix(40994): change type for optional properties (#41011) 2020-10-27 10:05:40 -07:00
fixReturnTypeInAsyncFunction.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixSpelling.ts Issue "Cannot find name did-you-mean" errors as suggestions in plain JS (#44271) 2021-06-15 08:54:08 -07:00
fixStrictClassInitialization.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixUnreachableCode.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
fixUnusedIdentifier.ts feat(eslint): consistent-type-assertions (#43556) 2021-05-18 06:20:57 -07:00
fixUnusedLabel.ts
generateAccessors.ts feat(eslint): consistent-type-assertions (#43556) 2021-05-18 06:20:57 -07:00
helpers.ts feat(28491): add QF to declare missing properties (#44576) 2021-06-17 11:12:29 -07:00
importFixes.ts Include actual generated module specifiers in module specifier cache (#44176) 2021-06-10 12:26:32 -05:00
inferFromUsage.ts Index signatures for symbols and template literal strings (#44512) 2021-06-21 11:25:42 -07:00
removeAccidentalCallParentheses.ts Code fix for accidental calls to get-accessors (#38749) 2020-06-18 13:58:42 -07:00
removeUnnecessaryAwait.ts
requireInTs.ts Allow type-only imports on ImportEqualsDeclarations (#41573) 2020-12-03 13:27:15 -08:00
returnValueCorrect.ts Index signatures for symbols and template literal strings (#44512) 2021-06-21 11:25:42 -07:00
splitTypeOnlyImport.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
useBigintLiteral.ts Refactor node factory API, use node factory in parser (#35282) 2020-06-16 16:55:03 -07:00
useDefaultImport.ts
wrapJsxInFragment.ts Fix regression no codefix for ts2657 (#43635) 2021-05-20 12:13:38 -07:00