Skip to content

getResultIsArray

Source Code | Documentation

Always returns the context.result or context.dispatch as an array.

ts
  import {  } from 'feathers-utils/utils';

Type declaration

ts
type GetResultIsArrayOptions = {
  dispatch?: boolean
}
/**
 * Always returns the `context.result` or `context.dispatch` as an array.
 *
 * @see https://utils.feathersjs.com/utils/get-result-is-array.html
 */
export declare function getResultIsArray<H extends HookContext = HookContext>(
  context: H,
  options?: GetResultIsArrayOptions,
): {
  isArray: boolean
  result: any[]
  key: "dispatch" | "result"
}
ArgumentTypeDescription
contextH
optionsGetResultIsArrayOptions

Released under the MIT License.