getExposedMethods
utils
Source Code | DocumentationReturns the list of method names that are publicly exposed by a Feathers service. Reads the internal [SERVICE].methods property set during service registration. Throws if the service does not have any exposed methods configured.
ts
import { getExposedMethods } from 'feathers-utils/utils';Example
ts
import { getExposedMethods } from 'feathers-utils/utils'
const methods = getExposedMethods(app.service('users'))
// => ['find', 'get', 'create', 'patch', 'remove']Type declaration
Show Type Declarations
ts
/**
* Returns the list of method names that are publicly exposed by a Feathers service.
* Reads the internal `[SERVICE].methods` property set during service registration.
* Throws if the service does not have any exposed methods configured.
*
* @example
* ```ts
*
*
* const methods = getExposedMethods(app.service('users'))
* // => ['find', 'get', 'create', 'patch', 'remove']
* ```
*
* @see https://utils.feathersjs.com/utils/get-exposed-methods.html
*/
export declare function getExposedMethods(service: Service): any[]| Argument | Type | Description |
|---|---|---|
| service | Service |
