Skip to content

Commit

Permalink
Revert "fix: Improve Service typings for DB Common API (#1838)"
Browse files Browse the repository at this point in the history
This reverts commit 5a87bd0.
  • Loading branch information
daffl committed Apr 11, 2020
1 parent 5a87bd0 commit 090bb34
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/adapter-commons/src/service.ts
Expand Up @@ -97,10 +97,6 @@ export class AdapterService<T = any> implements ServiceMethods<T> {
return callMethod(this, '_get', id, params);
}

create (data: Partial<T>, params?: Params): Promise<T>;

create (data: Partial<T>[], params?: Params): Promise<T[]>;

create (data: Partial<T> | Partial<T>[], params?: Params): Promise<T | T[]> {
if (Array.isArray(data) && !this.allowsMulti('create')) {
return Promise.reject(new MethodNotAllowed(`Can not create multiple entries`));
Expand All @@ -119,10 +115,6 @@ export class AdapterService<T = any> implements ServiceMethods<T> {
return callMethod(this, '_update', id, data, params);
}

patch (id: Id, data: Partial<T>, params?: Params): Promise<T>;

patch (id: null, data: Partial<T>, params?: Params): Promise<T[]>;

patch (id: NullableId, data: Partial<T>, params?: Params): Promise<T | T[]> {
if (id === null && !this.allowsMulti('patch')) {
return Promise.reject(new MethodNotAllowed(`Can not patch multiple entries`));
Expand All @@ -131,10 +123,6 @@ export class AdapterService<T = any> implements ServiceMethods<T> {
return callMethod(this, '_patch', id, data, params);
}

remove (id: Id, params?: Params): Promise<T>;

remove (id: null, params?: Params): Promise<T[]>;

remove (id: NullableId, params?: Params): Promise<T | T[]> {
if (id === null && !this.allowsMulti('remove')) {
return Promise.reject(new MethodNotAllowed(`Can not remove multiple entries`));
Expand Down

0 comments on commit 090bb34

Please sign in to comment.