@@ -6,6 +6,8 @@ open Fable.Core
6
6
open Fable.Import .JS
7
7
8
8
module vscode =
9
+ let [<Import("version","vscode")>] version : string = jsNative
10
+
9
11
type Command =
10
12
abstract title: string with get, set
11
13
abstract command: string with get, set
@@ -237,6 +239,16 @@ module vscode =
237
239
[<Emit( " $0($1...)" ) >] abstract Invoke: listener : Func < 'T , obj > * ? thisArgs : obj * ? disposables : ResizeArray < Disposable > -> Disposable
238
240
239
241
and [<Import("EventEmitter","vscode")>] EventEmitter < 'T >() =
242
+ member __.addListener ( ``event`` : string , listener : Function ): NodeJS.EventEmitter = jsNative
243
+ member __.on ( ``event`` : string , listener : Function ): NodeJS.EventEmitter = jsNative
244
+ member __.once ( ``event`` : string , listener : Function ): NodeJS.EventEmitter = jsNative
245
+ member __.removeListener ( ``event`` : string , listener : Function ): NodeJS.EventEmitter = jsNative
246
+ member __.removeAllListeners (? ``event`` : string ): NodeJS.EventEmitter = jsNative
247
+ member __.setMaxListeners ( n : int ): unit = jsNative
248
+ member __.getMaxListeners (): int = jsNative
249
+ member __.listeners ( ``event`` : string ): ResizeArray < Function > = jsNative
250
+ member __.listenerCount ( ``type`` : string ): int = jsNative
251
+ member __.emit ( ``event`` : string , [<ParamArray>] args : obj []): bool = jsNative
240
252
member __. ``event`` with get(): Event < 'T > = jsNative and set ( v : Event < 'T >): unit = jsNative
241
253
member __.fire (? data : 'T ): unit = jsNative
242
254
member __.dispose (): unit = jsNative
@@ -293,7 +305,7 @@ module vscode =
293
305
U3< string, DocumentFilter, ResizeArray< U2< string, DocumentFilter>>>
294
306
295
307
and ProviderResult < 'T > =
296
- U3< 'T, unit, obj >
308
+ U3< 'T, unit, PromiseLike < U2 < 'T , unit >> >
297
309
298
310
and CodeActionContext =
299
311
abstract diagnostics: ResizeArray < Diagnostic > with get, set
@@ -509,6 +521,26 @@ module vscode =
509
521
abstract provideDocumentLinks: document : TextDocument * token : CancellationToken -> ProviderResult < ResizeArray < DocumentLink >>
510
522
abstract resolveDocumentLink: link : DocumentLink * token : CancellationToken -> ProviderResult < DocumentLink >
511
523
524
+ and TreeDataProvider < 'T > =
525
+ abstract onDidChangeTreeData: Event < 'T > with get
526
+ abstract getTreeItem: element : 'T -> U2 < TreeItem , PromiseLike < TreeItem >>
527
+ abstract getChildren: ? element : 'T -> ProviderResult < ResizeArray < 'T >>
528
+
529
+ and TreeIconPath =
530
+ abstract light: U2 < string , Uri > with get, set
531
+ abstract dark: U2 < string , Uri > with get, set
532
+
533
+ and TreeItemCollapsibleState =
534
+ | None = 0
535
+ | Collapsed = 1
536
+ | Expanded = 2
537
+
538
+ and [<Import("TreeItem","vscode")>] TreeItem ( label : string , ? collapsibleState : TreeItemCollapsibleState ) =
539
+ abstract label: string with get, set
540
+ abstract iconPath: U2 < string , Uri , TreeIconPath > option with get, set
541
+ abstract contextValue: string option with get, set
542
+ abstract collapsibleState: TreeItemCollapsibleState option with get, set
543
+
512
544
and CharacterPair =
513
545
string * string
514
546
@@ -658,6 +690,10 @@ module vscode =
658
690
abstract location: ProgressLocation with get, set
659
691
abstract title: string option with get, set
660
692
693
+ and ProgressMessage =
694
+ abstract message: string option with get, set
695
+ abstract percentage: int option with get, set
696
+
661
697
and TextDocumentContentChangeEvent =
662
698
abstract range: Range with get, set
663
699
abstract rangeLength: float with get, set
@@ -727,6 +763,8 @@ module vscode =
727
763
728
764
type [<Import( " commands" , " vscode" ) >] commands =
729
765
static member registerCommand ( command : string , callback : Func < obj , obj >, ? thisArg : obj ): Disposable = jsNative
766
+ static member registerCommand ( command : string , callback : Func < obj , obj , obj >, ? thisArg : obj ): Disposable = jsNative
767
+ static member registerCommand ( command : string , callback : Func < obj , obj , obj , obj >, ? thisArg : obj ): Disposable = jsNative
730
768
static member registerTextEditorCommand ( command : string , callback : Func < TextEditor , TextEditorEdit , obj , unit >, ? thisArg : obj ): Disposable = jsNative
731
769
static member executeCommand ( command : string , [<ParamArray>] rest : obj []): PromiseLike < 'T option > = jsNative
732
770
static member getCommands (? filterInternal : bool ): PromiseLike < ResizeArray < string >> = jsNative
@@ -763,7 +801,7 @@ module vscode =
763
801
static member setStatusBarMessage ( text : string , hideWhenDone : PromiseLike < obj >): Disposable = jsNative
764
802
static member setStatusBarMessage ( text : string ): Disposable = jsNative
765
803
static member withScmProgress ( task : Func < Progress < float >, PromiseLike < 'R >>): PromiseLike < 'R > = jsNative
766
- static member withProgress ( options : ProgressOptions , task : Func < Progress < obj >, PromiseLike < 'R >>): PromiseLike < 'R > = jsNative
804
+ static member withProgress ( options : ProgressOptions , task : Func < Progress < ProgressMessage >, PromiseLike < 'R >>): PromiseLike < 'R > = jsNative
767
805
static member createStatusBarItem (? alignment : StatusBarAlignment , ? priority : float ): StatusBarItem = jsNative
768
806
static member createTerminal (? name : string , ? shellPath : string , ? shellArgs : ResizeArray < string >): Terminal = jsNative
769
807
static member createTerminal ( options : TerminalOptions ): Terminal = jsNative
0 commit comments