Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Update TypeScript definition for service.patch (#199)
Browse files Browse the repository at this point in the history
Similar to React's `setState`, the `patch` function should allow a partial object of a given type, but no extraneous keys thereafter.

Resource: https://github.com/developit/preact/blob/f7834ec9fb7848581c6fbc7833bcbe2f2db9fe61/src/preact.d.ts#L61
  • Loading branch information
kfatehi authored and daffl committed Oct 22, 2017
1 parent 06927e1 commit 1bf6c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ declare module 'feathers-client' {
get(id: string, params?: any): Promise<T>;
create(data: T, params?: any): Promise<T>;
update(id: string, data: T, params?: any): Promise<T>;
patch(id: string, data: T, params?: any) : Promise<T>;
patch<K extends keyof T>(id: string, data:Pick<T, K>, params?: any) : Promise<T>;
remove(id: string, params?: any): Promise<T>;

// Realtime interface.
Expand Down

0 comments on commit 1bf6c2d

Please sign in to comment.