Starter.start()method
Run the start callback (once).
start(...values: T): void
new Starter<T>(start: StartCallback<T>)
| Param | Type | |
|---|---|---|
start | StartCallback<T> | Callback function that starts something with multiple values and returns an optional stop callback. required |
| Return | |
|---|---|
Starter<T> | Wrapper class to handle state on start/stop callback process. |
Wrapper class to handle state on start/stop callback process.
starter.start() won't be called twice (including if start() didn't return a stop() callback).Disposable so it can be used with using, calling stop() on disposal.Run the start callback (once).
start(...values: T): void
Run the stop callback (if one was returned by the start callback).
stop(): void