mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Add builder-method for snippet choice
This commit is contained in:
@@ -740,6 +740,12 @@ export class SnippetString {
|
||||
return this;
|
||||
}
|
||||
|
||||
appendChoice(values: string[], number?: number): SnippetString {
|
||||
this.appendPlaceholder(values.toString(), number)
|
||||
this.value = this.value.replace(/:/g, '|').replace(/}/g, '|}')
|
||||
return this;
|
||||
}
|
||||
|
||||
appendVariable(name: string, defaultValue?: string | ((snippet: SnippetString) => any)): SnippetString {
|
||||
|
||||
if (typeof defaultValue === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user