Fix errors in type definitions (#1263)

This commit is contained in:
Tomas Della Vedova
2020-07-20 14:00:24 +02:00
committed by GitHub
parent e6a4050b0b
commit 58117792de
3 changed files with 28 additions and 4 deletions

View File

@ -14,6 +14,7 @@ import {
TransportRequestParams,
TransportRequestOptions,
TransportRequestCallback,
TransportRequestPromise,
RequestEvent,
ApiError,
RequestBody,
@ -152,7 +153,7 @@ transport.request({
})
const promise = transport.request(params, options)
expectType<Promise<ApiResponse>>(promise)
expectType<TransportRequestPromise<ApiResponse>>(promise)
promise.then(result => expectType<ApiResponse>(result))
expectType<ApiResponse>(await promise)