mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Add watchOptions to tsconfig and allow supplying them on command line as well (#35615)
* Create different watch options in compiler options * Thread through the new watch options * Actually use the options passed through for watch strategy * Support delay on updating child directory watches * Make watchOptions separate from compilerOptions * Support passing watch options from command line * Handle displaying of watchOptions
This commit is contained in:
@@ -1276,7 +1276,7 @@ namespace ts.server.protocol {
|
||||
* For external projects, some of the project settings are sent together with
|
||||
* compiler settings.
|
||||
*/
|
||||
export type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
|
||||
export type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
|
||||
|
||||
/**
|
||||
* Contains information about current project version
|
||||
@@ -1404,6 +1404,36 @@ namespace ts.server.protocol {
|
||||
* The host's additional supported .js file extensions
|
||||
*/
|
||||
extraFileExtensions?: FileExtensionInfo[];
|
||||
|
||||
watchOptions?: WatchOptions;
|
||||
}
|
||||
|
||||
export const enum WatchFileKind {
|
||||
FixedPollingInterval = "FixedPollingInterval",
|
||||
PriorityPollingInterval = "PriorityPollingInterval",
|
||||
DynamicPriorityPolling = "DynamicPriorityPolling",
|
||||
UseFsEvents = "UseFsEvents",
|
||||
UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory",
|
||||
}
|
||||
|
||||
export const enum WatchDirectoryKind {
|
||||
UseFsEvents = "UseFsEvents",
|
||||
FixedPollingInterval = "FixedPollingInterval",
|
||||
DynamicPriorityPolling = "DynamicPriorityPolling",
|
||||
}
|
||||
|
||||
export const enum PollingWatchKind {
|
||||
FixedInterval = "FixedInterval",
|
||||
PriorityInterval = "PriorityInterval",
|
||||
DynamicPriority = "DynamicPriority",
|
||||
}
|
||||
|
||||
export interface WatchOptions {
|
||||
watchFile?: WatchFileKind | ts.WatchFileKind;
|
||||
watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind;
|
||||
fallbackPolling?: PollingWatchKind | ts.PollingWatchKind;
|
||||
synchronousWatchDirectory?: boolean;
|
||||
[option: string]: CompilerOptionsValue | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user