diff --git a/index.d.ts b/index.d.ts index ab721bb96..0e0c149ea 100644 --- a/index.d.ts +++ b/index.d.ts @@ -26,41 +26,41 @@ declare namespace feathers { * Retrieves a list of all resources from the service. * Provider parameters will be passed as params.query */ - find(params?: Params, callback?: any): Promise>; + find?(params?: Params, callback?: any): Promise>; /** * Retrieves a single resource with the given id from the service. */ - get(id: number | string, params?: Params, callback?: any): Promise; + get?(id: number | string, params?: Params, callback?: any): Promise; /** * Creates a new resource with data. */ - create(data: T | T[], params?: Params, callback?: any): Promise; + create?(data: T | T[], params?: Params, callback?: any): Promise; /** * Replaces the resource identified by id with data. * Update multiples resources with id equal `null` */ - update(id: NullableId, data: T, params?: Params, callback?: any): Promise; + update?(id: NullableId, data: T, params?: Params, callback?: any): Promise; /** * Merges the existing data of the resource identified by id with the new data. * Implement patch additionally to update if you want to separate between partial and full updates and support the PATCH HTTP method. * Patch multiples resources with id equal `null` */ - patch(id: NullableId, data: any, params?: Params, callback?: any): Promise; + patch?(id: NullableId, data: any, params?: Params, callback?: any): Promise; /** * Removes the resource with id. * Delete multiple resources with id equal `null` */ - remove(id: NullableId, params?: Params, callback?: any): Promise; + remove?(id: NullableId, params?: Params, callback?: any): Promise; /** * Initialize your service with any special configuration or if connecting services that are very tightly coupled */ - setup(app?: Application, path?: string): void; + setup?(app?: Application, path?: string): void; } interface FeathersUseHandler extends expressCore.IRouterHandler, express.IRouterMatcher {