Skip to content

Commit

Permalink
fix(types): use const type parameter for QueryBuilder only (#2546)
Browse files Browse the repository at this point in the history
  • Loading branch information
thunfisch987 authored Feb 19, 2024
1 parent 233771b commit 7966323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/types/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ export interface ContentQueryBuilder<T = ParsedContentMeta, Y = {}> {
/**
* Select a subset of fields
*/
only<K extends keyof T | string>(keys: K): ContentQueryBuilder<Pick<T, K>, Y>
only<K extends (keyof T | string)[]>(keys: K): ContentQueryBuilder<Pick<T, K[number]>, Y>
only<const K extends keyof T | string>(keys: K): ContentQueryBuilder<Pick<T, K>, Y>
only<const K extends (keyof T | string)[]>(keys: K): ContentQueryBuilder<Pick<T, K[number]>, Y>

/**
* Remove a subset of fields
Expand Down

0 comments on commit 7966323

Please sign in to comment.