Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"prettier": "^3.6.2",
"reflect-metadata": "^0.2.2",
"rimraf": "^6.0.1",
"typescript": "^5.9.3",
"typescript": "^6.0.3",
"vitest": "^4.0.2"
},
"engines": {
Expand Down
59 changes: 42 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/client/types/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,17 @@ export type OmitByType<T, Type> = Pick<
{ [K in keyof T]-?: T[K] extends Type ? never : K }[keyof T]
>;

// TS 6.0 infers the exact argument shape (unknown keys included), so T[K]
// checks a value against itself — excess keys pass. U[K] checks against the
// declared shape instead. The phantom-key branch keeps T[K] referenced so
// TypeScript still infers T and Payload<T,U> still narrows to selected fields.
// https://github.com/microsoft/TypeScript/issues/63515
export type Options<T, U> = {
[K in keyof T]: K extends keyof U ? T[K] : never;
[K in keyof T]: K extends keyof U
? K extends "__use_T_so_it_is_inferred__"
? T[K]
: U[K]
: never;
};

export type OrderBy = "ASC" | "DESC";
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"module": "ESNext",
"moduleDetection": "force",
"skipLibCheck": true,
"types": ["node"],

"allowJs": true,
"esModuleInterop": true,
Expand Down