mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
framework: use @cordisjs/core instead
This commit is contained in:
1 parent
221283e8e8
commit
2c8c03153e
10 files changed
+86
-179
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import type { HandlerCommon } from './server';
|
||||
import type { Context } from '@cordisjs/core';
|
||||
|
||||
export default function serializer(ignoreSerializeFunction = false, h?: HandlerCommon) {
|
||||
export default function serializer<T extends Context>(ignoreSerializeFunction = false, h?: HandlerCommon<T>) {
|
||||
return (k: string, v: any) => {
|
||||
if (k.startsWith('_') && k !== '_id') return undefined;
|
||||
if (typeof v === 'bigint') return `BigInt::${v.toString()}`;
|
||||
|
||||
Reference in new issue
Block a user