{"version":3,"file":"guards.mjs","names":[],"sources":["../src/guards/has-query/has-query.guard.ts"],"sourcesContent":["import type { Params } from '@feathersjs/feathers'\nimport type { RequiredQuery } from '../../utility-types/required-query.js'\n\n/**\n * Type guard to check if the `query` property of `Params` is present and non-nullable.\n *\n * @param params - The `Params` object to check.\n * @returns `true` if `params.query` is present and non-nullable, otherwise `false`.\n *\n * @see https://utils.feathersjs.com/guards/has-query.html\n *\n * @example\n * ```ts\n * import { hasQuery } from 'feathers-utils/guards'\n *\n * function example(params: Params) {\n *   // `params.query` is optional and can be undefined at this point\n *   if (!hasQuery(params)) {\n *     return;\n *   }\n *\n *   // TypeScript now knows that params.query is present and non-nullable\n *   // You can safely access params.query here without additional checks\n * }\n * ```\n */\nexport function hasQuery<P extends Params>(\n  params: P,\n): params is RequiredQuery<P> {\n  return !!params.query\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,SACd,QAC4B;CAC5B,OAAO,CAAC,CAAC,OAAO;AAClB"}