Source

adminjs/src/utils/flat/flat.types.ts

  1. /**
  2. * Type of flatten params.
  3. *
  4. * @memberof module:flat
  5. * @alias FlattenParams
  6. */
  7. export type FlattenParams = {
  8. [key: string]: FlattenValue;
  9. }
  10. export type FlattenValue = string | boolean | number | Date | null | [] | {} | File
  11. /**
  12. * @memberof module:flat
  13. * @alias GetOptions
  14. */
  15. export type GetOptions = {
  16. /**
  17. * Indicates if all the "less related" siblings should be included. This option takes care of
  18. * fetching elements in nested arrays. Let's say you have keys: `nested.0.array.0` and `
  19. * `nested.1.array.0.`. With `includeAllSiblings` you will fetch all nested.N.array elements.
  20. */
  21. includeAllSiblings?: boolean;
  22. }
  23. /**
  24. * Available types for flatten values. This is an Union of types:
  25. * - `string`
  26. * - `boolean`
  27. * - `number`
  28. * - `Date`
  29. * - `null`
  30. * - `[]` (empty array)
  31. * - `{}` (empty object)
  32. * - `File`
  33. * @memberof module:flat
  34. * @alias FlattenValue
  35. * @typedef {Union} FlattenValue
  36. */