typescript 5.1.0-dev.20230419 → 5.1.0-dev.20230421
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +207 -41
- package/lib/tsserver.js +346 -166
- package/lib/tsserverlibrary.d.ts +31 -7
- package/lib/tsserverlibrary.js +344 -160
- package/lib/typescript.d.ts +15 -2
- package/lib/typescript.js +245 -62
- package/lib/typingsInstaller.js +3 -1
- package/package.json +5 -3
package/lib/typescript.d.ts
CHANGED
|
@@ -5222,7 +5222,7 @@ declare namespace ts {
|
|
|
5222
5222
|
* this list is only the set of defaults that are implicitly included.
|
|
5223
5223
|
*/
|
|
5224
5224
|
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
|
|
5225
|
-
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
|
|
5225
|
+
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): ModuleResolutionCache;
|
|
5226
5226
|
function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
|
|
5227
5227
|
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
5228
5228
|
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
|
|
@@ -6153,6 +6153,8 @@ declare namespace ts {
|
|
|
6153
6153
|
getRenameInfo(fileName: string, position: number, preferences: UserPreferences): RenameInfo;
|
|
6154
6154
|
/** @deprecated Use the signature with `UserPreferences` instead. */
|
|
6155
6155
|
getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo;
|
|
6156
|
+
findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, preferences: UserPreferences): readonly RenameLocation[] | undefined;
|
|
6157
|
+
/** @deprecated Pass `providePrefixAndSuffixTextForRename` as part of a `UserPreferences` parameter. */
|
|
6156
6158
|
findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined;
|
|
6157
6159
|
getSmartSelectionRange(fileName: string, position: number): SelectionRange;
|
|
6158
6160
|
getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
|
|
@@ -6198,7 +6200,13 @@ declare namespace ts {
|
|
|
6198
6200
|
applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>;
|
|
6199
6201
|
/** @deprecated `fileName` will be ignored */
|
|
6200
6202
|
applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
|
|
6201
|
-
|
|
6203
|
+
/**
|
|
6204
|
+
* @param includeInteractiveActions Include refactor actions that require additional arguments to be
|
|
6205
|
+
* passed when calling `getEditsForRefactor`. When true, clients should inspect the `isInteractive`
|
|
6206
|
+
* property of each returned `RefactorActionInfo` and ensure they are able to collect the appropriate
|
|
6207
|
+
* arguments for any interactive action before offering it.
|
|
6208
|
+
*/
|
|
6209
|
+
getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string, includeInteractiveActions?: boolean): ApplicableRefactorInfo[];
|
|
6202
6210
|
getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
|
|
6203
6211
|
organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
|
|
6204
6212
|
getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
|
|
@@ -6470,6 +6478,11 @@ declare namespace ts {
|
|
|
6470
6478
|
* The hierarchical dotted name of the refactor action.
|
|
6471
6479
|
*/
|
|
6472
6480
|
kind?: string;
|
|
6481
|
+
/**
|
|
6482
|
+
* Indicates that the action requires additional arguments to be passed
|
|
6483
|
+
* when calling `getEditsForRefactor`.
|
|
6484
|
+
*/
|
|
6485
|
+
isInteractive?: boolean;
|
|
6473
6486
|
}
|
|
6474
6487
|
/**
|
|
6475
6488
|
* A set of edits to make in response to a refactor action, plus an optional
|