New Response Type

This commit is contained in:
Deepak Dahiya
2022-03-31 09:42:59 +00:00
committed by GitHub
parent b602df7c05
commit 79acd5bac4
5 changed files with 28 additions and 10 deletions
+4 -2
View File
@@ -13,7 +13,8 @@ import {
InternalCacheOptions,
CommitCacheRequest,
ReserveCacheRequest,
ReserveCacheResponse
ReserveCacheResponse,
ITypedResponseWithErrorMessage
} from './contracts'
import {downloadCacheHttpClient, downloadCacheStorageSDK} from './downloadUtils'
import {
@@ -143,7 +144,7 @@ export async function reserveCache(
key: string,
paths: string[],
options?: InternalCacheOptions
): Promise<ITypedResponse<ReserveCacheResponse>> {
): Promise<ITypedResponseWithErrorMessage<ReserveCacheResponse>> {
const httpClient = createHttpClient()
const version = getCacheVersion(paths, options?.compressionMethod)
@@ -158,6 +159,7 @@ export async function reserveCache(
reserveCacheRequest
)
)
console.log(response)
return response
}