(defaults: MonacoGraphQLAPI)
| 21 | private _client: Promise<GraphQLWorker> | null = null; |
| 22 | |
| 23 | constructor(defaults: MonacoGraphQLAPI) { |
| 24 | this._defaults = defaults; |
| 25 | this._idleCheckInterval = window.setInterval( |
| 26 | () => this._checkIfIdle(), |
| 27 | 30 * 1000, |
| 28 | ); |
| 29 | // this is where we re-start the worker on config changes |
| 30 | this._configChangeListener = this._defaults.onDidChange(() => { |
| 31 | this._stopWorker(); |
| 32 | }); |
| 33 | } |
| 34 | |
| 35 | private _stopWorker(): void { |
| 36 | if (this._worker) { |
nothing calls this directly
no test coverage detected