mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add function names for quick fix code actions.
This commit is contained in:
committed by
GitHub
parent
a05d851dc3
commit
b85f5a0612
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToAddConvertToUnknownForNonOverlappingTypes(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span.start));
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Add_unknown_conversion_for_non_overlapping_types, fixId, Diagnostics.Add_unknown_to_all_conversions_of_non_overlapping_types)];
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToAddMissingConst(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span.start, context.program));
|
||||
if (changes.length > 0) {
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Add_const_to_unresolved_variable, fixId, Diagnostics.Add_const_to_all_unresolved_variables)];
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToAddMissingDeclareProperty(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span.start));
|
||||
if (changes.length > 0) {
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Prefix_with_declare, fixId, Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)];
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToAddMissingInvocationForDecorator(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span.start));
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Call_decorator_expression, fixId, Diagnostics.Add_to_all_uncalled_decorators)];
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span.start));
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Add_parameter_name, fixId, Diagnostics.Add_names_to_all_parameters_without_names)];
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToAddOptionalPropertyUndefined(context) {
|
||||
const typeChecker = context.program.getTypeChecker();
|
||||
const toAdd = getPropertiesToAdd(context.sourceFile, context.span, typeChecker);
|
||||
if (!toAdd.length) {
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToAnnotateWithTypeFromJSDoc(context) {
|
||||
const decl = getDeclaration(context.sourceFile, context.span.start);
|
||||
if (!decl) return;
|
||||
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, decl));
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context: CodeFixContext) {
|
||||
getCodeActions: function getCodeActionsToConvertFunctionToEs6Class(context: CodeFixContext) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t =>
|
||||
doChange(t, context.sourceFile, context.span.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions()));
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Convert_function_to_an_ES2015_class, fixId, Diagnostics.Convert_all_constructor_functions_to_classes)];
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace ts.codefix {
|
||||
let codeActionSucceeded = true;
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context: CodeFixContext) {
|
||||
getCodeActions: function getCodeActionsToConvertToAsyncFunction(context: CodeFixContext) {
|
||||
codeActionSucceeded = true;
|
||||
const changes = textChanges.ChangeTracker.with(context, (t) => convertToAsyncFunction(t, context.sourceFile, context.span.start, context.program.getTypeChecker()));
|
||||
return codeActionSucceeded ? [createCodeFixAction(fixId, changes, Diagnostics.Convert_to_async_function, fixId, Diagnostics.Convert_all_to_async_functions)] : [];
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToCorrectQualifiedNameToIndexedAccessType(context) {
|
||||
const qualifiedName = getQualifiedName(context.sourceFile, context.span.start);
|
||||
if (!qualifiedName) return undefined;
|
||||
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, qualifiedName));
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToDisableJsDiagnostics(context) {
|
||||
const { sourceFile, program, span, host, formatContext } = context;
|
||||
|
||||
if (!isInJSFile(sourceFile) || !isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixMissingMember(context) {
|
||||
const typeChecker = context.program.getTypeChecker();
|
||||
const info = getInfo(context.sourceFile, context.span.start, context.errorCode, typeChecker, context.program);
|
||||
if (!info) {
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToAddMissingNewOperator(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const changes = textChanges.ChangeTracker.with(context, t => addMissingNewOperator(t, sourceFile, span));
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Add_missing_new_operator_to_call, fixId, Diagnostics.Add_missing_new_operator_to_all_calls)];
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ts.codefix {
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
fixIds: [fixId],
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToAddVoidToPromise(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span, context.program));
|
||||
if (changes.length > 0) {
|
||||
return [createCodeFixAction(fixName, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)];
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ts.codefix {
|
||||
];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixAwaitInSyncFunction(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const nodes = getNodes(sourceFile, span.start);
|
||||
if (!nodes) return undefined;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ts.codefix {
|
||||
const fixId = "fixClassDoesntImplementInheritedAbstractMember";
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const changes = textChanges.ChangeTracker.with(context, t =>
|
||||
addMissingMembers(getClass(sourceFile, span.start), sourceFile, context, t, context.preferences));
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ts.codefix {
|
||||
const fixId = "fixClassIncorrectlyImplementsInterface"; // TODO: share a group with fixClassDoesntImplementInheritedAbstractMember?
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixClassIncorrectlyImplementsInterface(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const classDeclaration = getClass(sourceFile, span.start);
|
||||
return mapDefined<ExpressionWithTypeArguments, CodeFixAction>(getEffectiveImplementsTypeNodes(classDeclaration), implementedTypeNode => {
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToClassSuperMustPrecedeThisAccess(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const nodes = getNodes(sourceFile, span.start);
|
||||
if (!nodes) return undefined;
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToConstructorForDerivedNeedSuperCall(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const ctr = getNode(sourceFile, span.start);
|
||||
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, ctr));
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace ts.codefix {
|
||||
];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToEnableExperimentalDecorators(context) {
|
||||
const { configFile } = context.program.getCompilerOptions();
|
||||
if (configFile === undefined) {
|
||||
return undefined;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixExpectedComma(context) {
|
||||
const { sourceFile } = context;
|
||||
const info = getInfo(sourceFile, context.span.start, context.errorCode);
|
||||
if (!info) return undefined;
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToSwitchFromExtendsInInterfaceToImplements(context) {
|
||||
const { sourceFile } = context;
|
||||
const nodes = getNodes(sourceFile, context.span.start);
|
||||
if (!nodes) return undefined;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace ts.codefix {
|
||||
];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixForgottenThisPropertyAccess(context) {
|
||||
const { sourceFile } = context;
|
||||
const info = getInfo(sourceFile, context.span.start, context.errorCode);
|
||||
if (!info) {
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixImplicitThis(context) {
|
||||
const { sourceFile, program, span } = context;
|
||||
let diagnostic: DiagnosticAndArguments | undefined;
|
||||
const changes = textChanges.ChangeTracker.with(context, t => {
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace ts.codefix {
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
fixIds: [fixIdExpression, fixIdHtmlEntity],
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixInvalidJsxCharacters_expression(context) {
|
||||
const { sourceFile, preferences, span } = context;
|
||||
const changeToExpression = textChanges.ChangeTracker.with(context, t => doChange(t, preferences, sourceFile, span.start, /* useHtmlEntity */ false));
|
||||
const changeToHtmlEntity = textChanges.ChangeTracker.with(context, t => doChange(t, preferences, sourceFile, span.start, /* useHtmlEntity */ true));
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixJSDocTypes(context) {
|
||||
const { sourceFile } = context;
|
||||
const checker = context.program.getTypeChecker();
|
||||
const info = getInfo(sourceFile, context.span.start, checker);
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ts.codefix {
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
fixIds: [fixId],
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixMissingCallParentheses(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const callName = getCallName(sourceFile, span.start);
|
||||
if (!callName) return;
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ts.codefix {
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
fixIds: [fixId],
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixNoPropertyAccessFromIndexSignature(context) {
|
||||
const { sourceFile, span, preferences } = context;
|
||||
const property = getPropertyAccessExpression(sourceFile, span.start);
|
||||
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, property, preferences));
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ts.codefix {
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
fixIds: [fixId],
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixPropertyAssignment(context) {
|
||||
const { sourceFile, span } = context;
|
||||
const property = getProperty(sourceFile, span.start);
|
||||
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, property));
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ts.codefix {
|
||||
const fixId = "fixPropertyOverrideAccessor";
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixPropertyOverrideAccessor(context) {
|
||||
const edits = doChange(context.sourceFile, context.span.start, context.span.length, context.errorCode, context);
|
||||
if (edits) {
|
||||
return [createCodeFixAction(fixId, edits, Diagnostics.Generate_get_and_set_accessors, fixId, Diagnostics.Generate_get_and_set_accessors_for_all_overriding_properties)];
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ts.codefix {
|
||||
];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixSpelling(context) {
|
||||
const { sourceFile, errorCode } = context;
|
||||
const info = getInfo(sourceFile, context.span.start, context, errorCode);
|
||||
if (!info) return undefined;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToFixStrictClassInitialization(context) {
|
||||
const propertyDeclaration = getPropertyDeclaration(context.sourceFile, context.span.start);
|
||||
if (!propertyDeclaration) return;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Unreachable_code_detected.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixUnreachableCode(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, context.span.start, context.span.length, context.errorCode));
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Remove_unreachable_code, fixId, Diagnostics.Remove_all_unreachable_code)];
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixUnusedIdentifier(context) {
|
||||
const { errorCode, sourceFile, program, cancellationToken } = context;
|
||||
const checker = program.getTypeChecker();
|
||||
const sourceFiles = program.getSourceFiles();
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Unused_label.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixUnusedLabel(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, context.span.start));
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Remove_unused_label, fixId, Diagnostics.Remove_all_unused_labels)];
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToFixMissingImport(context) {
|
||||
const { errorCode, preferences, sourceFile, span, program } = context;
|
||||
const info = getFixesInfo(context, errorCode, span.start, /*useAutoImportProvider*/ true);
|
||||
if (!info) return undefined;
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace ts.codefix {
|
||||
];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToInferFromUsage(context) {
|
||||
const { sourceFile, program, span: { start }, errorCode, cancellationToken, host, preferences } = context;
|
||||
|
||||
const token = getTokenAtPosition(sourceFile, start);
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace ts.codefix {
|
||||
];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToRemoveAccidentalCallParentheses(context) {
|
||||
const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression);
|
||||
if (!callExpression) {
|
||||
return undefined;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ts.codefix {
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions: (context) => {
|
||||
getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {
|
||||
const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span));
|
||||
if (changes.length > 0) {
|
||||
return [createCodeFixAction(fixId, changes, Diagnostics.Remove_unnecessary_await, fixId, Diagnostics.Remove_all_unnecessary_uses_of_await)];
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.require_call_may_be_converted_to_an_import.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToConvertRequireToImportInTs(context) {
|
||||
const info = getInfo(context.sourceFile, context.program, context.span.start);
|
||||
if (!info) {
|
||||
return undefined;
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ts.codefix {
|
||||
const errorCodes = [Diagnostics.Import_may_be_converted_to_a_default_import.code];
|
||||
registerCodeFix({
|
||||
errorCodes,
|
||||
getCodeActions(context) {
|
||||
getCodeActions: function getCodeActionsToUseDefaultImport(context) {
|
||||
const { sourceFile, span: { start } } = context;
|
||||
const info = getInfo(sourceFile, start);
|
||||
if (!info) return undefined;
|
||||
|
||||
Reference in New Issue
Block a user