Skip to content

Commit

Permalink
Use proper ID type for rest update method
Browse files Browse the repository at this point in the history
  • Loading branch information
DaddyWarbucks committed Jul 19, 2023
1 parent ccc9370 commit 4676d04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rest-client/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export abstract class Base<T = any, D = Partial<T>, 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"))
}
Expand All @@ -155,7 +155,7 @@ export abstract class Base<T = any, D = Partial<T>, 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)
}

Expand Down

0 comments on commit 4676d04

Please sign in to comment.