import { Params } from "@feathersjs/feathers"; //#region src/utility-types/required-query.d.ts /** * Make the `query` property of `Params` required and non-nullable. * * By default, the `query` property in `Params` is optional and can be `undefined`. This utility type ensures that `query` is always present and not `null` or `undefined`, which can be useful for functions that rely on the presence of a query object. */ type RequiredQuery
= P & { query: NonNullable
; }; //#endregion //#region src/guards/has-query/has-query.guard.d.ts /** * Type guard to check if the `query` property of `Params` is present and non-nullable. * * @param params - The `Params` object to check. * @returns `true` if `params.query` is present and non-nullable, otherwise `false`. * * @see https://utils.feathersjs.com/guards/has-query.html * * @example * ```ts * import { hasQuery } from 'feathers-utils/guards' * * function example(params: Params) { * // `params.query` is optional and can be undefined at this point * if (!hasQuery(params)) { * return; * } * * // TypeScript now knows that params.query is present and non-nullable * // You can safely access params.query here without additional checks * } * ``` */ declare function hasQuery
(params: P): params is RequiredQuery
; //#endregion export { hasQuery }; //# sourceMappingURL=guards.d.mts.map