(
key: IntegrationTaskKey,
callback: (client: LinearClient, task: IOTask, io: IO) => Promise<TResult>,
options?: RunTaskOptions,
errorCallback?: RunTaskErrorCallback
)
| 150 | } |
| 151 | |
| 152 | runTask<T, TResult extends Json<T> | void>( |
| 153 | key: IntegrationTaskKey, |
| 154 | callback: (client: LinearClient, task: IOTask, io: IO) => Promise<TResult>, |
| 155 | options?: RunTaskOptions, |
| 156 | errorCallback?: RunTaskErrorCallback |
| 157 | ): Promise<TResult> { |
| 158 | if (!this._io) throw new Error("No IO"); |
| 159 | if (!this._connectionKey) throw new Error("No connection key"); |
| 160 | |
| 161 | return this._io.runTask( |
| 162 | key, |
| 163 | (task, io) => { |
| 164 | if (!this._client) throw new Error("No client"); |
| 165 | return callback(this._client, task, io); |
| 166 | }, |
| 167 | { |
| 168 | icon: "linear", |
| 169 | retry: retry.standardBackoff, |
| 170 | ...(options ?? {}), |
| 171 | connectionKey: this._connectionKey, |
| 172 | }, |
| 173 | errorCallback ?? onError |
| 174 | ); |
| 175 | } |
| 176 | |
| 177 | async getAll< |
| 178 | TTask extends ( |
no outgoing calls
no test coverage detected