From 4676d048d26e2f6a3ba2934cb44d16779e4ec0a7 Mon Sep 17 00:00:00 2001 From: DaddyWarbucks Date: Wed, 19 Jul 2023 13:41:27 -0500 Subject: [PATCH] Use proper ID type for rest update method --- packages/rest-client/src/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rest-client/src/base.ts b/packages/rest-client/src/base.ts index af2d656423..6f581018cc 100644 --- a/packages/rest-client/src/base.ts +++ b/packages/rest-client/src/base.ts @@ -139,7 +139,7 @@ export abstract class Base, P extends Params = RestClien return this._create(data, params) } - _update(id: NullableId, data: D, params?: P) { + _update(id: Id, data: D, params?: P) { if (typeof id === 'undefined') { return Promise.reject(new Error("id for 'update' can not be undefined")) } @@ -155,7 +155,7 @@ export abstract class Base, P extends Params = RestClien ).catch(toError) } - update(id: NullableId, data: D, params?: P) { + update(id: Id, data: D, params?: P) { return this._update(id, data, params) }