Skip to content

Commit d0f215d

Browse files
committed
use type augmentations for static members where a backing type exists from the generator
1 parent 3b41c72 commit d0f215d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/TypeDefaults.fs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module Extensions =
4747
CompletionItemKind.Reference
4848
|]
4949

50-
type TextDocumentSyncOptions =
50+
type TextDocumentSyncOptions with
5151
static member Default = {
5252
OpenClose = None
5353
Change = None
@@ -56,13 +56,13 @@ module Extensions =
5656
Save = None
5757
}
5858

59-
type WorkspaceFoldersServerCapabilities =
59+
type WorkspaceFoldersServerCapabilities with
6060
static member Default = { Supported = None; ChangeNotifications = None }
6161

62-
type FileOperationPatternOptions =
62+
type FileOperationPatternOptions with
6363
static member Default = { IgnoreCase = None }
6464

65-
type FileOperationOptions =
65+
type FileOperationOptions with
6666
static member Default = {
6767
DidCreate = None
6868
WillCreate = None
@@ -77,7 +77,7 @@ module Extensions =
7777
static member Default = {| WorkspaceFolders = None; FileOperations = None |}
7878

7979

80-
type ServerCapabilities =
80+
type ServerCapabilities with
8181
static member Default = {
8282
TextDocumentSync = None
8383
HoverProvider = None
@@ -117,10 +117,10 @@ module Extensions =
117117
}
118118

119119

120-
type InitializeResult =
120+
type InitializeResult with
121121
static member Default = { Capabilities = ServerCapabilities.Default; ServerInfo = None }
122122

123-
type CompletionItem =
123+
type CompletionItem with
124124
static member Create(label: string) = {
125125
Label = label
126126
LabelDetails = None
@@ -154,10 +154,10 @@ module Extensions =
154154
| Report -> "report"
155155
| End -> "end"
156156

157-
type WorkDoneProgressEnd =
157+
type WorkDoneProgressEnd with
158158
static member Create(?message) = { Kind = WorkDoneProgressKind.End.ToString(); Message = message }
159159

160-
type WorkDoneProgressBegin =
160+
type WorkDoneProgressBegin with
161161
static member Create(title, ?cancellable, ?message, ?percentage) = {
162162
Kind = WorkDoneProgressKind.Begin.ToString()
163163
Title = title
@@ -166,7 +166,7 @@ module Extensions =
166166
Percentage = percentage
167167
}
168168

169-
type WorkDoneProgressReport =
169+
type WorkDoneProgressReport with
170170
static member Create(?cancellable, ?message, ?percentage) = {
171171
Kind = WorkDoneProgressKind.Report.ToString()
172172
Cancellable = cancellable
@@ -175,7 +175,7 @@ module Extensions =
175175
}
176176

177177

178-
type WorkspaceEdit =
178+
type WorkspaceEdit with
179179
static member DocumentChangesToChanges(edits: TextDocumentEdit[]) =
180180
edits
181181
|> Array.map (fun edit ->

0 commit comments

Comments
 (0)