make pages/[user]/[type].tsx type-safe (#484)
* make `pages/[user]/[type].tsx` type-safe * deprecate `whereAndSelect`
This commit is contained in:
1 parent
aed9757409
commit
2af160a13e
2 files changed
+85
-78
No files matched your search
@@ -27,6 +27,11 @@ const pluck = (select: Record<string, boolean>, attr: string) => {
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* This function will always return `any` type,
|
||||
* See https://github.com/calendso/calendso/pull/460 for alternative approach
|
||||
*/
|
||||
const whereAndSelect = (modelQuery, criteria: Record<string, unknown>, pluckedAttributes: string[]) =>
|
||||
modelQuery({
|
||||
where: criteria,
|
||||
|
||||
Reference in new issue
Block a user