/third_party/typescript/src/services/ |
D | codeFixProvider.ts | 23 for (const error of reg.errorCodes) { 39 const { errorCodes } = registration; constant 42 if (contains(errorCodes, diag.code)) maybeFixableDiagnostics++; 73 errorCodes: number[], 77 …= textChanges.ChangeTracker.with(context, t => eachDiagnostic(context, errorCodes, diag => use(t, … 81 …export function eachDiagnostic(context: CodeFixAllContext, errorCodes: readonly number[], cb: (dia… 83 if (contains(errorCodes, diag.code)) {
|
/third_party/typescript/src/services/codefixes/ |
D | fixEnableExperimentalDecorators.ts | 4 const errorCodes = [ constant 8 errorCodes, 19 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes) => {
|
D | fixEnableJsxFlag.ts | 4 const errorCodes = [Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code]; constant 6 errorCodes, 22 codeFixAll(context, errorCodes, changes => {
|
D | convertToTypeOnlyExport.ts | 3 …const errorCodes = [Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requ… constant 6 errorCodes, 16 return codeFixAll(context, errorCodes, (changes, diag) => { 76 …t === originExportSpecifier || findDiagnosticForNode(element, diagnostics)?.code === errorCodes[0];
|
D | useBigintLiteral.ts | 4 const errorCodes = [ constant 9 errorCodes, 18 … return codeFixAll(context, errorCodes, (changes, diag) => makeChange(changes, diag.file, diag));
|
D | addMissingInvocationForDecorator.ts | 4 …const errorCodes = [Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_yo… constant 6 errorCodes, 12 …getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => makeChange(change…
|
D | addMissingDeclareProperty.ts | 4 const errorCodes = [ constant 9 errorCodes, 19 …return codeFixAll(context, errorCodes, (changes, diag) => makeChange(changes, diag.file, diag.star…
|
D | fixPropertyAssignment.ts | 4 const errorCodes = [ constant 9 errorCodes, 18 …codeFixAll(context, errorCodes, (changes, diag) => doChange(changes, diag.file, getProperty(diag.f…
|
D | fixAddMissingNewOperator.ts | 4 … const errorCodes = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code]; constant 6 errorCodes, 13 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) =>
|
D | fixConstructorForDerivedNeedSuperCall.ts | 4 … const errorCodes = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code]; constant 6 errorCodes, 14 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) =>
|
D | fixUnusedLabel.ts | 4 const errorCodes = [Diagnostics.Unused_label.code]; constant 6 errorCodes, 12 …getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => doChange(changes,…
|
D | fixMissingCallParentheses.ts | 4 const errorCodes = [ constant 9 errorCodes, 19 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => {
|
D | removeUnnecessaryAwait.ts | 4 const errorCodes = [ constant 9 errorCodes, 18 … return codeFixAll(context, errorCodes, (changes, diag) => makeChange(changes, diag.file, diag));
|
D | addNameToNamelessParameter.ts | 4 const errorCodes = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code]; constant 6 errorCodes, 12 …getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => makeChange(change…
|
D | fixAddModuleReferTypeMissingTypeof.ts | 5 …const errorCodes = [Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_y… constant 8 errorCodes, 16 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) =>
|
D | fixExpectedComma.ts | 5 const errorCodes = [expectedErrorCode]; constant 8 errorCodes, 25 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => {
|
D | fixNoPropertyAccessFromIndexSignature.ts | 4 const errorCodes = [ constant 9 errorCodes, 18 …codeFixAll(context, errorCodes, (changes, diag) => doChange(changes, diag.file, getPropertyAccessE…
|
D | fixInvalidJsxCharacters.ts | 6 const errorCodes = [ constant 12 errorCodes, 25 …return codeFixAll(context, errorCodes, (changes, diagnostic) => doChange(changes, context.preferen…
|
D | splitTypeOnlyImport.ts | 3 …const errorCodes = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_… constant 6 errorCodes, 16 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, error) => {
|
D | convertToTypeOnlyImport.ts | 3 …const errorCodes = [Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_beca… constant 6 errorCodes, 18 return codeFixAll(context, errorCodes, (changes, diag) => {
|
D | correctQualifiedNameToIndexedAccessType.ts | 4 …const errorCodes = [Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_… constant 6 errorCodes, 15 getAllCodeActions: (context) => codeFixAll(context, errorCodes, (changes, diag) => {
|
D | addConvertToUnknownForNonOverlappingTypes.ts | 4 …const errorCodes = [Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_ty… constant 6 errorCodes, 14 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => {
|
D | convertLiteralTypeToMappedType.ts | 4 …const errorCodes = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you… constant 7 errorCodes, 19 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => {
|
D | fixForgottenThisPropertyAccess.ts | 5 const errorCodes = [ constant 11 errorCodes, 22 getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => {
|
D | fixCannotFindModule.ts | 7 const errorCodes = [ constant 12 errorCodes, 24 return codeFixAll(context, errorCodes, (_changes, diag, commands) => {
|