Skip to content

Commit d095257

Browse files
Add getOptions method to retrieve current configuration of monaco-yaml (#280)
1 parent 187d130 commit d095257

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ export interface MonacoYaml extends IDisposable {
187187
* Recondigure `monaco-yaml`.
188188
*/
189189
update: (options: MonacoYamlOptions) => Promise<undefined>
190+
191+
/**
192+
* Get the current configuration of `monaco-yaml`.
193+
*/
194+
getOptions: () => MonacoYamlOptions
190195
}
191196

192197
/**
@@ -425,6 +430,10 @@ export function configureMonacoYaml(monaco: MonacoEditor, options?: MonacoYamlOp
425430
async update(newOptions) {
426431
workerManager.updateCreateData(Object.assign(createData, newOptions))
427432
await markerDataProvider.revalidate()
433+
},
434+
435+
getOptions() {
436+
return createData
428437
}
429438
}
430439
}

0 commit comments

Comments
 (0)