Skip to content

Commit

Permalink
fix(types): exclude known-bad keys
Browse files Browse the repository at this point in the history
This helps TypeScript correctly get the keys containing the data
  • Loading branch information
wolfy1339 committed Sep 27, 2024
1 parent 966abac commit 40a6d13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ type KnownKeys<T> = Extract<
} extends { [_ in keyof T]: infer U }
? U
: never,
keyof T
Exclude<
keyof T,
"repository_selection" | "total_count" | "incomplete_results"
>
>;
type KeysMatching<T, V> = {
[K in keyof T]: T[K] extends V ? K : never;
Expand Down

0 comments on commit 40a6d13

Please sign in to comment.