Update @azure/cosmos to 3.9.0 (#154)

This commit is contained in:
Tanuj Mittal
2020-08-17 14:26:19 -07:00
committed by GitHub
parent 07b9c1d1b7
commit 3279460cfd
3 changed files with 20 additions and 12 deletions

View File

@@ -14,7 +14,8 @@ import {
PartitionKeyDefinition,
QueryIterator,
Resource,
TriggerDefinition
TriggerDefinition,
OfferDefinition
} from "@azure/cosmos";
import { ContainerRequest } from "@azure/cosmos/dist-esm/client/Container/ContainerRequest";
import { client } from "./CosmosClient";
@@ -244,7 +245,8 @@ export function updateOffer(
return Q(
client()
.offer(offer.id)
.replace(newOffer, options)
// TODO Remove casting when SDK types are fixed (https://github.com/Azure/azure-sdk-for-js/issues/10660)
.replace((newOffer as unknown) as OfferDefinition, options)
.then(response => {
return Promise.all([refreshCachedOffers(), refreshCachedResources()]).then(() => response.resource);
})