mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-25 15:35:43 +01:00
Add missing example
This commit is contained in:
@@ -372,6 +372,10 @@ export namespace Event {
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* // Start accumulating events, when the first listener is attached, flush
|
||||
* // the event after a timeout such that multiple listeners attached before
|
||||
* // the timeout would receive the event
|
||||
* this.onInstallExtension = Event.buffer(service.onInstallExtension, true);
|
||||
* ```
|
||||
*/
|
||||
export function buffer<T>(event: Event<T>, flushAfterTimeout = false, _buffer: T[] = []): Event<T> {
|
||||
|
||||
Reference in New Issue
Block a user