framework: use @cordisjs/core instead

This commit is contained in:
undefined committed 2025-03-04 03:04:01 +08:00
1 parent 221283e8e8
commit 2c8c03153e
10 files changed
+86 -179

No files matched your search

+2 -1
View File
@@ -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()}`;