Skip to content

Commit 4cbace7

Browse files
authored
Add "auto" to importModuleSpecifierPreference (microsoft#34981)
* Add "auto" to importModuleSpecifierPreference * Update APIs
1 parent db43be1 commit 4cbace7

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6458,7 +6458,7 @@ namespace ts {
64586458
readonly includeCompletionsForModuleExports?: boolean;
64596459
readonly includeAutomaticOptionalChainCompletions?: boolean;
64606460
readonly includeCompletionsWithInsertText?: boolean;
6461-
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
6461+
readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
64626462
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
64636463
readonly importModuleSpecifierEnding?: "minimal" | "index" | "js";
64646464
readonly allowTextChangesInNewFiles?: boolean;

src/server/protocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3013,7 +3013,7 @@ namespace ts.server.protocol {
30133013
* values, with insertion text to replace preceding `.` tokens with `?.`.
30143014
*/
30153015
readonly includeAutomaticOptionalChainCompletions?: boolean;
3016-
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
3016+
readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
30173017
readonly allowTextChangesInNewFiles?: boolean;
30183018
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
30193019
readonly providePrefixAndSuffixTextForRename?: boolean;

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,7 @@ declare namespace ts {
31743174
readonly includeCompletionsForModuleExports?: boolean;
31753175
readonly includeAutomaticOptionalChainCompletions?: boolean;
31763176
readonly includeCompletionsWithInsertText?: boolean;
3177-
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
3177+
readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
31783178
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
31793179
readonly importModuleSpecifierEnding?: "minimal" | "index" | "js";
31803180
readonly allowTextChangesInNewFiles?: boolean;
@@ -8304,7 +8304,7 @@ declare namespace ts.server.protocol {
83048304
* values, with insertion text to replace preceding `.` tokens with `?.`.
83058305
*/
83068306
readonly includeAutomaticOptionalChainCompletions?: boolean;
8307-
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
8307+
readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
83088308
readonly allowTextChangesInNewFiles?: boolean;
83098309
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
83108310
readonly providePrefixAndSuffixTextForRename?: boolean;

tests/baselines/reference/api/typescript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,7 @@ declare namespace ts {
31743174
readonly includeCompletionsForModuleExports?: boolean;
31753175
readonly includeAutomaticOptionalChainCompletions?: boolean;
31763176
readonly includeCompletionsWithInsertText?: boolean;
3177-
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
3177+
readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
31783178
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
31793179
readonly importModuleSpecifierEnding?: "minimal" | "index" | "js";
31803180
readonly allowTextChangesInNewFiles?: boolean;

tests/cases/fourslash/fourslash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ declare namespace FourSlashInterface {
584584
readonly includeCompletionsForModuleExports?: boolean;
585585
readonly includeInsertTextCompletions?: boolean;
586586
readonly includeAutomaticOptionalChainCompletions?: boolean;
587-
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
587+
readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
588588
readonly importModuleSpecifierEnding?: "minimal" | "index" | "js";
589589
}
590590
interface CompletionsOptions {

0 commit comments

Comments
 (0)