mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Use explicit extensions for imports within src (#58421)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
AsExpression,
|
||||
Diagnostics,
|
||||
@@ -11,12 +16,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
TypeAssertion,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "addConvertToUnknownForNonOverlappingTypes";
|
||||
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];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes: [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
ArrowFunction,
|
||||
CodeFixAllContext,
|
||||
@@ -28,12 +33,7 @@ import {
|
||||
TextSpan,
|
||||
textSpanEnd,
|
||||
textSpansEqual,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
type ContextualTrackChangesFunction = (cb: (changeTracker: textChanges.ChangeTracker) => void) => FileTextChanges[];
|
||||
const fixId = "addMissingAsync";
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CancellationToken,
|
||||
CodeFixAllContext,
|
||||
@@ -44,13 +50,7 @@ import {
|
||||
tryCast,
|
||||
TypeChecker,
|
||||
TypeFlags,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
type ContextualTrackChangesFunction = (cb: (changeTracker: textChanges.ChangeTracker) => void) => FileTextChanges[];
|
||||
const fixId = "addMissingAwait";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
every,
|
||||
@@ -17,12 +22,7 @@ import {
|
||||
textChanges,
|
||||
tryAddToSet,
|
||||
TypeChecker,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "addMissingConst";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
getTokenAtPosition,
|
||||
@@ -7,12 +12,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
tryAddToSet,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "addMissingDeclareProperty";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Debug,
|
||||
Diagnostics,
|
||||
@@ -7,12 +12,7 @@ import {
|
||||
isDecorator,
|
||||
SourceFile,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "addMissingInvocationForDecorator";
|
||||
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];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
createRange,
|
||||
Debug,
|
||||
@@ -14,12 +19,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
TypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "addNameToNamelessParameter";
|
||||
const errorCodes = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
emptyArray,
|
||||
@@ -26,11 +30,7 @@ import {
|
||||
TextSpan,
|
||||
TypeChecker,
|
||||
UnionTypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const addOptionalPropertyUndefined = "addOptionalPropertyUndefined";
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Debug,
|
||||
Diagnostics,
|
||||
@@ -40,12 +45,7 @@ import {
|
||||
visitEachChild,
|
||||
visitNode,
|
||||
visitNodes,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "annotateWithTypeFromJSDoc";
|
||||
const errorCodes = [Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
createCodeFixActionMaybeFixAll,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addToSeen,
|
||||
Diagnostics,
|
||||
@@ -13,13 +19,7 @@ import {
|
||||
textChanges,
|
||||
Token,
|
||||
tryCast,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionMaybeFixAll,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixConvertConstToLet";
|
||||
const errorCodes = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
__String,
|
||||
AccessExpression,
|
||||
@@ -60,12 +65,7 @@ import {
|
||||
TypeChecker,
|
||||
UserPreferences,
|
||||
VariableDeclaration,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "convertFunctionToEs6Class";
|
||||
const errorCodes = [Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
cast,
|
||||
Diagnostics,
|
||||
@@ -10,12 +15,7 @@ import {
|
||||
textChanges,
|
||||
TypeLiteralNode,
|
||||
TypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "convertLiteralTypeToMappedType";
|
||||
const errorCodes = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
ArrowFunction,
|
||||
AwaitExpression,
|
||||
@@ -77,12 +82,7 @@ import {
|
||||
TypeNode,
|
||||
TypeReference,
|
||||
UnionReduction,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "convertToAsyncFunction";
|
||||
const errorCodes = [Diagnostics.This_may_be_converted_to_an_async_function.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
moduleSpecifierToValidIdentifier,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
__String,
|
||||
arrayFrom,
|
||||
@@ -74,12 +79,7 @@ import {
|
||||
textChanges,
|
||||
TypeChecker,
|
||||
VariableStatement,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
moduleSpecifierToValidIdentifier,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes: [Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
cast,
|
||||
Diagnostics,
|
||||
@@ -21,12 +26,7 @@ import {
|
||||
TypeAliasDeclaration,
|
||||
TypeLiteralNode,
|
||||
TypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixConvertToMappedObjectType";
|
||||
const errorCodes = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addToSeen,
|
||||
CodeFixContextBase,
|
||||
@@ -17,12 +22,7 @@ import {
|
||||
textChanges,
|
||||
TextSpan,
|
||||
tryCast,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const errorCodes = [Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code];
|
||||
const fixId = "convertToTypeOnlyExport";
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -17,13 +23,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const errorCodes = [
|
||||
Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -23,12 +28,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
TypeAliasDeclaration,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "convertTypedefToType";
|
||||
const errorCodes = [Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Debug,
|
||||
Diagnostics,
|
||||
@@ -10,12 +15,7 @@ import {
|
||||
QualifiedName,
|
||||
SourceFile,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "correctQualifiedNameToIndexedAccessType";
|
||||
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];
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
createFileTextChanges,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CodeFixAction,
|
||||
createTextChange,
|
||||
@@ -13,14 +20,7 @@ import {
|
||||
SourceFile,
|
||||
textChanges,
|
||||
tryAddToSet,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
createFileTextChanges,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixName = "disableJsDiagnostics";
|
||||
const fixId = "disableJsDiagnostics";
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCombinedCodeActions,
|
||||
createImportAdder,
|
||||
eachDiagnostic,
|
||||
findAncestorMatchingSpan,
|
||||
getNoopSymbolTrackerWithResolver,
|
||||
registerCodeFix,
|
||||
typeToAutoImportableTypeNode,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addToSeen,
|
||||
createTextSpan,
|
||||
@@ -25,17 +35,7 @@ import {
|
||||
TypeChecker,
|
||||
TypeParameterDeclaration,
|
||||
UserPreferences,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCombinedCodeActions,
|
||||
createImportAdder,
|
||||
eachDiagnostic,
|
||||
findAncestorMatchingSpan,
|
||||
getNoopSymbolTrackerWithResolver,
|
||||
registerCodeFix,
|
||||
typeToAutoImportableTypeNode,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "addMissingConstraint";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
createCombinedCodeActions,
|
||||
createImportAdder,
|
||||
createSignatureDeclarationFromCallExpression,
|
||||
createSignatureDeclarationFromSignature,
|
||||
createStubbedBody,
|
||||
eachDiagnostic,
|
||||
getAllSupers,
|
||||
ImportAdder,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
__String,
|
||||
addToSeen,
|
||||
@@ -112,20 +125,7 @@ import {
|
||||
TypeNode,
|
||||
TypeReference,
|
||||
UnionType,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
createCombinedCodeActions,
|
||||
createImportAdder,
|
||||
createSignatureDeclarationFromCallExpression,
|
||||
createSignatureDeclarationFromSignature,
|
||||
createStubbedBody,
|
||||
eachDiagnostic,
|
||||
getAllSupers,
|
||||
ImportAdder,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixMissingMember = "fixMissingMember";
|
||||
const fixMissingProperties = "fixMissingProperties";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
cast,
|
||||
Diagnostics,
|
||||
@@ -9,12 +14,7 @@ import {
|
||||
textChanges,
|
||||
TextSpan,
|
||||
textSpanEnd,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "addMissingNewOperator";
|
||||
const errorCodes = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
ImportAdder,
|
||||
importSymbols,
|
||||
registerCodeFix,
|
||||
tryGetAutoImportableReferenceFromTypeNode,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
append,
|
||||
ArrowFunction,
|
||||
@@ -44,16 +53,7 @@ import {
|
||||
TypeChecker,
|
||||
TypeNode,
|
||||
UserPreferences,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
ImportAdder,
|
||||
importSymbols,
|
||||
registerCodeFix,
|
||||
tryGetAutoImportableReferenceFromTypeNode,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const addMissingParamFixId = "addMissingParam";
|
||||
const addOptionalParamFixId = "addOptionalParam";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Debug,
|
||||
Diagnostics,
|
||||
@@ -7,12 +12,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixIdAddMissingTypeof = "fixAddModuleReferTypeMissingTypeof";
|
||||
const fixId = fixIdAddMissingTypeof;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CodeFixAllContext,
|
||||
Diagnostics,
|
||||
@@ -24,12 +29,7 @@ import {
|
||||
textChanges,
|
||||
TextSpan,
|
||||
TypeFlags,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixName = "addVoidToPromise";
|
||||
const fixId = "addVoidToPromise";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addToSeen,
|
||||
ArrowFunction,
|
||||
@@ -19,12 +24,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
TypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixAwaitInSyncFunction";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Debug,
|
||||
Diagnostics,
|
||||
@@ -11,12 +16,7 @@ import {
|
||||
parsePackageName,
|
||||
SourceFile,
|
||||
tryCast,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixName = "fixCannotFindModule";
|
||||
const fixIdInstallTypesPackage = "installTypesPackage";
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
createMissingMemberNodes,
|
||||
registerCodeFix,
|
||||
TypeConstructionContext,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addToSeen,
|
||||
cast,
|
||||
@@ -15,15 +23,7 @@ import {
|
||||
Symbol,
|
||||
textChanges,
|
||||
UserPreferences,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
createMissingMemberNodes,
|
||||
registerCodeFix,
|
||||
TypeConstructionContext,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const errorCodes = [
|
||||
Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
createMissingMemberNodes,
|
||||
getNoopSymbolTrackerWithResolver,
|
||||
registerCodeFix,
|
||||
TypeConstructionContext,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addToSeen,
|
||||
and,
|
||||
@@ -27,16 +36,7 @@ import {
|
||||
textChanges,
|
||||
TypeChecker,
|
||||
UserPreferences,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
createMissingMemberNodes,
|
||||
getNoopSymbolTrackerWithResolver,
|
||||
registerCodeFix,
|
||||
TypeConstructionContext,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const errorCodes = [
|
||||
Diagnostics.Class_0_incorrectly_implements_interface_1.code,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addToSeen,
|
||||
CallExpression,
|
||||
@@ -16,12 +21,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "classSuperMustPrecedeThisAccess";
|
||||
const errorCodes = [Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
ConstructorDeclaration,
|
||||
Debug,
|
||||
@@ -8,12 +13,7 @@ import {
|
||||
isConstructorDeclaration,
|
||||
SourceFile,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "constructorForDerivedNeedSuperCall";
|
||||
const errorCodes = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code];
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
textChanges,
|
||||
TsConfigSourceFile,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
setJsonCompilerOptionValue,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
textChanges,
|
||||
TsConfigSourceFile,
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixID = "fixEnableJsxFlag";
|
||||
const errorCodes = [Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -8,12 +13,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixExpectedComma";
|
||||
const expectedErrorCode = Diagnostics._0_expected.code;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -9,12 +14,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "extendsInterfaceBecomesImplements";
|
||||
const errorCodes = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -10,12 +15,7 @@ import {
|
||||
SourceFile,
|
||||
suppressLeadingAndTrailingTrivia,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "forgottenThisPropertyAccess";
|
||||
const didYouMeanStaticMemberCode = Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
ANONYMOUS,
|
||||
Debug,
|
||||
@@ -17,12 +22,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
TypeChecker,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixImplicitThis";
|
||||
const errorCodes = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
canHaveExportModifier,
|
||||
canHaveLocals,
|
||||
@@ -30,13 +36,7 @@ import {
|
||||
textChanges,
|
||||
tryCast,
|
||||
VariableStatement,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixImportNonExportedMember";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -10,11 +14,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixIncorrectNamedTupleSyntax";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
addRange,
|
||||
CallExpression,
|
||||
@@ -24,11 +28,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixName = "invalidImportSyntax";
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
hasProperty,
|
||||
@@ -5,12 +10,7 @@ import {
|
||||
SourceFile,
|
||||
textChanges,
|
||||
UserPreferences,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixIdExpression = "fixInvalidJsxCharacters_expression";
|
||||
const fixIdHtmlEntity = "fixInvalidJsxCharacters_htmlEntity";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
append,
|
||||
AsExpression,
|
||||
@@ -30,12 +35,7 @@ import {
|
||||
TypeFlags,
|
||||
TypeNode,
|
||||
VariableDeclaration,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixIdPlain = "fixJSDocTypes_plain";
|
||||
const fixIdNullable = "fixJSDocTypes_nullable";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
getTokenAtPosition,
|
||||
@@ -8,12 +13,7 @@ import {
|
||||
PropertyAccessExpression,
|
||||
SourceFile,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixMissingCallParentheses";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -94,7 +94,7 @@ import {
|
||||
VariableDeclaration,
|
||||
VariableStatement,
|
||||
walkUpParenthesizedExpressions,
|
||||
} from "../_namespaces/ts";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
import {
|
||||
createCodeFixAction,
|
||||
@@ -103,8 +103,8 @@ import {
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
typeToAutoImportableTypeNode,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
import { getIdentifierForNode } from "../refactors/helpers";
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import { getIdentifierForNode } from "../refactors/helpers.js";
|
||||
|
||||
const fixId = "fixMissingTypeAnnotationOnExports";
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
setJsonCompilerOptionValue,
|
||||
setJsonCompilerOptionValues,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CodeFixAction,
|
||||
Diagnostics,
|
||||
@@ -9,13 +15,7 @@ import {
|
||||
ModuleKind,
|
||||
ScriptTarget,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
setJsonCompilerOptionValue,
|
||||
setJsonCompilerOptionValues,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
registerCodeFix({
|
||||
errorCodes: [
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
findAncestorMatchingSpan,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
BinaryExpression,
|
||||
createTextSpan,
|
||||
@@ -14,13 +20,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
TextSpan,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
findAncestorMatchingSpan,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixNaNEquality";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
cast,
|
||||
Diagnostics,
|
||||
@@ -11,12 +16,7 @@ import {
|
||||
SourceFile,
|
||||
textChanges,
|
||||
UserPreferences,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixNoPropertyAccessFromIndexSignature";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixActionMaybeFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CodeFixAllContext,
|
||||
CodeFixContext,
|
||||
@@ -31,12 +36,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixActionMaybeFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixName = "fixOverrideModifier";
|
||||
const fixAddOverrideId = "fixAddOverrideModifier";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
cast,
|
||||
Diagnostics,
|
||||
@@ -8,12 +13,7 @@ import {
|
||||
ShorthandPropertyAssignment,
|
||||
SourceFile,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixPropertyAssignment";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
generateAccessorFromProperty,
|
||||
getAllSupers,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CodeFixAllContext,
|
||||
CodeFixContext,
|
||||
@@ -11,14 +18,7 @@ import {
|
||||
singleOrUndefined,
|
||||
SourceFile,
|
||||
unescapeLeadingUnderscores,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
generateAccessorFromProperty,
|
||||
getAllSupers,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const errorCodes = [
|
||||
Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -10,12 +15,7 @@ import {
|
||||
Type,
|
||||
TypeChecker,
|
||||
TypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixReturnTypeInAsyncFunction";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CodeFixContextBase,
|
||||
Debug,
|
||||
@@ -36,12 +41,7 @@ import {
|
||||
symbolName,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixSpelling";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
append,
|
||||
BigIntLiteralType,
|
||||
@@ -27,12 +32,7 @@ import {
|
||||
TypeChecker,
|
||||
TypeFlags,
|
||||
TypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixName = "strictClassInitialization";
|
||||
const fixIdAddDefiniteAssignmentAssertions = "addMissingPropertyDefiniteAssignmentAssertions";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
__String,
|
||||
append,
|
||||
@@ -21,14 +28,7 @@ import {
|
||||
SignatureDeclaration,
|
||||
SourceFile,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCodeFixActionWithoutFixAll,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const deleteUnmatchedParameter = "deleteUnmatchedParameter";
|
||||
const renameUnmatchedParameter = "renameUnmatchedParameter";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Debug,
|
||||
Diagnostics,
|
||||
@@ -13,12 +18,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixUnreachableCode";
|
||||
const errorCodes = [Diagnostics.Unreachable_code_detected.code];
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
append,
|
||||
CodeFixAction,
|
||||
@@ -23,11 +27,7 @@ import {
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
tryCast,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixUnreferenceableDecoratorMetadata";
|
||||
const errorCodes = [Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
ArrayBindingPattern,
|
||||
CancellationToken,
|
||||
@@ -59,12 +64,7 @@ import {
|
||||
TypeChecker,
|
||||
VariableDeclaration,
|
||||
VariableDeclarationList,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixName = "unusedIdentifier";
|
||||
const fixIdPrefix = "unusedIdentifier_prefix";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
cast,
|
||||
Diagnostics,
|
||||
@@ -9,12 +14,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "fixUnusedLabel";
|
||||
const errorCodes = [Diagnostics.Unused_label.code];
|
||||
|
||||
@@ -55,7 +55,7 @@ import {
|
||||
textChanges,
|
||||
TypeChecker,
|
||||
TypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
/** @internal */
|
||||
export type AcceptedDeclaration = ParameterPropertyDeclaration | PropertyDeclaration | PropertyAssignment;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ImportAdder } from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
AccessorDeclaration,
|
||||
append,
|
||||
@@ -110,8 +111,7 @@ import {
|
||||
visitEachChild,
|
||||
visitNode,
|
||||
visitNodes,
|
||||
} from "../_namespaces/ts";
|
||||
import { ImportAdder } from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
/**
|
||||
* Finds members of the resolved type that are missing in the class pointed to by class decl
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
AnyImportOrRequire,
|
||||
AnyImportOrRequireStatement,
|
||||
@@ -153,13 +159,7 @@ import {
|
||||
TypeOnlyAliasDeclaration,
|
||||
UserPreferences,
|
||||
VariableDeclarationInitializedTo,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixAction,
|
||||
createCombinedCodeActions,
|
||||
eachDiagnostic,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
/** @internal */
|
||||
export const importFixName = "import";
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
ImportAdder,
|
||||
registerCodeFix,
|
||||
tryGetAutoImportableReferenceFromTypeNode,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
__String,
|
||||
AnonymousType,
|
||||
@@ -101,15 +109,7 @@ import {
|
||||
UnionReduction,
|
||||
UserPreferences,
|
||||
VariableDeclaration,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
createImportAdder,
|
||||
ImportAdder,
|
||||
registerCodeFix,
|
||||
tryGetAutoImportableReferenceFromTypeNode,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "inferFromUsage";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
findAncestor,
|
||||
getTokenAtPosition,
|
||||
isCallExpression,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
createCodeFixActionWithoutFixAll,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "removeAccidentalCallParentheses";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
AwaitKeyword,
|
||||
Diagnostics,
|
||||
@@ -13,12 +18,7 @@ import {
|
||||
textChanges,
|
||||
TextSpan,
|
||||
tryCast,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "removeUnnecessaryAwait";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
cast,
|
||||
Debug,
|
||||
@@ -21,12 +26,7 @@ import {
|
||||
textChanges,
|
||||
tryCast,
|
||||
VariableStatement,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "requireInTs";
|
||||
const errorCodes = [Diagnostics.require_call_may_be_converted_to_an_import.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
append,
|
||||
ArrowFunction,
|
||||
@@ -39,12 +44,7 @@ import {
|
||||
Type,
|
||||
TypeChecker,
|
||||
VariableLikeDeclaration,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "returnValueCorrect";
|
||||
const fixIdAddReturnStatement = "fixAddReturnStatement";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
CodeFixContextBase,
|
||||
Debug,
|
||||
@@ -10,12 +15,7 @@ import {
|
||||
SourceFile,
|
||||
textChanges,
|
||||
TextSpan,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const errorCodes = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];
|
||||
const fixId = "splitTypeOnlyImport";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Diagnostics,
|
||||
factory,
|
||||
@@ -7,12 +12,7 @@ import {
|
||||
textChanges,
|
||||
TextSpan,
|
||||
tryCast,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "useBigintLiteral";
|
||||
const errorCodes = [
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
AnyImportSyntax,
|
||||
Diagnostics,
|
||||
@@ -14,12 +19,7 @@ import {
|
||||
SourceFile,
|
||||
textChanges,
|
||||
UserPreferences,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "useDefaultImport";
|
||||
const errorCodes = [Diagnostics.Import_may_be_converted_to_a_default_import.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
Debug,
|
||||
Diagnostics,
|
||||
@@ -7,12 +12,7 @@ import {
|
||||
isDecorator,
|
||||
SourceFile,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixId = "wrapDecoratorInParentheses";
|
||||
const errorCodes = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix.js";
|
||||
import {
|
||||
BinaryExpression,
|
||||
Diagnostics,
|
||||
@@ -11,12 +16,7 @@ import {
|
||||
SourceFile,
|
||||
SyntaxKind,
|
||||
textChanges,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
codeFixAll,
|
||||
createCodeFixAction,
|
||||
registerCodeFix,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
} from "../_namespaces/ts.js";
|
||||
|
||||
const fixID = "wrapJsxInFragment";
|
||||
const errorCodes = [Diagnostics.JSX_expressions_must_have_one_parent_element.code];
|
||||
|
||||
Reference in New Issue
Block a user