Function
normalizeGetTemplatesOptions
(
options: GetTemplatesOptions | GetTemplatesQuery = {},
)
Source from the content-addressed store, hash-verified
| 375 | }>; |
| 376 | |
| 377 | function normalizeGetTemplatesOptions( |
| 378 | options: GetTemplatesOptions | GetTemplatesQuery = {}, |
| 379 | ): Record<string, string> { |
| 380 | if ("q" in options) { |
| 381 | return options; |
| 382 | } |
| 383 | |
| 384 | const params: Record<string, string> = {}; |
| 385 | if (options.deprecated !== undefined) { |
| 386 | params.deprecated = String(options.deprecated); |
| 387 | } |
| 388 | return params; |
| 389 | } |
| 390 | |
| 391 | type SearchParamOptions = TypesGen.Pagination & { |
| 392 | q?: string; |
Tested by
no test coverage detected