@@ -64,7 +64,10 @@ declare namespace ts.server.protocol {
6464 OrganizeImports = "organizeImports" ,
6565 GetEditsForFileRename = "getEditsForFileRename" ,
6666 ConfigurePlugin = "configurePlugin" ,
67- SelectionRange = "selectionRange"
67+ SelectionRange = "selectionRange" ,
68+ PrepareCallHierarchy = "prepareCallHierarchy" ,
69+ ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls" ,
70+ ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls"
6871 }
6972 /**
7073 * A TypeScript Server message
@@ -957,7 +960,7 @@ declare namespace ts.server.protocol {
957960 * For external projects, some of the project settings are sent together with
958961 * compiler settings.
959962 */
960- type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin ;
963+ type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions ;
961964 /**
962965 * Represents a set of changes that happen in project
963966 */
@@ -997,6 +1000,31 @@ declare namespace ts.server.protocol {
9971000 * The host's additional supported .js file extensions
9981001 */
9991002 extraFileExtensions ?: FileExtensionInfo [ ] ;
1003+ watchOptions ?: WatchOptions ;
1004+ }
1005+ const enum WatchFileKind {
1006+ FixedPollingInterval = "FixedPollingInterval" ,
1007+ PriorityPollingInterval = "PriorityPollingInterval" ,
1008+ DynamicPriorityPolling = "DynamicPriorityPolling" ,
1009+ UseFsEvents = "UseFsEvents" ,
1010+ UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory"
1011+ }
1012+ const enum WatchDirectoryKind {
1013+ UseFsEvents = "UseFsEvents" ,
1014+ FixedPollingInterval = "FixedPollingInterval" ,
1015+ DynamicPriorityPolling = "DynamicPriorityPolling"
1016+ }
1017+ const enum PollingWatchKind {
1018+ FixedInterval = "FixedInterval" ,
1019+ PriorityInterval = "PriorityInterval" ,
1020+ DynamicPriority = "DynamicPriority"
1021+ }
1022+ interface WatchOptions {
1023+ watchFile ?: WatchFileKind | ts . WatchFileKind ;
1024+ watchDirectory ?: WatchDirectoryKind | ts . WatchDirectoryKind ;
1025+ fallbackPolling ?: PollingWatchKind | ts . PollingWatchKind ;
1026+ synchronousWatchDirectory ?: boolean ;
1027+ [ option : string ] : CompilerOptionsValue | undefined ;
10001028 }
10011029 /**
10021030 * Configure request; value of command field is "configure". Specifies
@@ -2269,6 +2297,39 @@ declare namespace ts.server.protocol {
22692297 interface NavTreeResponse extends Response {
22702298 body ?: NavigationTree ;
22712299 }
2300+ interface CallHierarchyItem {
2301+ name : string ;
2302+ kind : ScriptElementKind ;
2303+ file : string ;
2304+ span : TextSpan ;
2305+ selectionSpan : TextSpan ;
2306+ }
2307+ interface CallHierarchyIncomingCall {
2308+ from : CallHierarchyItem ;
2309+ fromSpans : TextSpan [ ] ;
2310+ }
2311+ interface CallHierarchyOutgoingCall {
2312+ to : CallHierarchyItem ;
2313+ fromSpans : TextSpan [ ] ;
2314+ }
2315+ interface PrepareCallHierarchyRequest extends FileLocationRequest {
2316+ command : CommandTypes . PrepareCallHierarchy ;
2317+ }
2318+ interface PrepareCallHierarchyResponse extends Response {
2319+ readonly body : CallHierarchyItem | CallHierarchyItem [ ] ;
2320+ }
2321+ interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2322+ command : CommandTypes . ProvideCallHierarchyIncomingCalls ;
2323+ }
2324+ interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2325+ readonly body : CallHierarchyIncomingCall [ ] ;
2326+ }
2327+ interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2328+ command : CommandTypes . ProvideCallHierarchyOutgoingCalls ;
2329+ }
2330+ interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2331+ readonly body : CallHierarchyOutgoingCall [ ] ;
2332+ }
22722333 const enum IndentStyle {
22732334 None = "None" ,
22742335 Block = "Block" ,
@@ -2565,6 +2626,8 @@ declare namespace ts.server.protocol {
25652626 scriptKind ?: ScriptKind ;
25662627 }
25672628
2629+ export type CompilerOptionsValue = string | number | boolean | ( string | number ) [ ] | string [ ] | MapLike < string [ ] > | PluginImport [ ] | ProjectReference [ ] | null | undefined ;
2630+
25682631 interface JSDocTagInfo {
25692632 name : string ;
25702633 text ?: string ;
@@ -2593,12 +2656,13 @@ declare namespace ts.server.protocol {
25932656 /** True if it is intended that this reference form a circularity */
25942657 circular ?: boolean ;
25952658 }
2596-
2597- export type CompilerOptionsValue = string | number | boolean | ( string | number ) [ ] | string [ ] | MapLike < string [ ] > | PluginImport [ ] | ProjectReference [ ] | null | undefined ;
25982659}
25992660declare namespace ts {
26002661 // these types are empty stubs for types from services and should not be used directly
26012662 export type ScriptKind = never ;
2663+ export type WatchFileKind = never ;
2664+ export type WatchDirectoryKind = never ;
2665+ export type PollingWatchKind = never ;
26022666 export type IndentStyle = never ;
26032667 export type JsxEmit = never ;
26042668 export type ModuleKind = never ;
0 commit comments