mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&framework: pass type checks on cordis 4.0.0-alpha.1
This commit is contained in:
1 parent
2c8c03153e
commit
bd63331137
13 files changed
+100
-64
No files matched your search
@@ -1,7 +1,6 @@
|
||||
import type { HandlerCommon } from './server';
|
||||
import type { Context } from '@cordisjs/core';
|
||||
|
||||
export default function serializer<T extends Context>(ignoreSerializeFunction = false, h?: HandlerCommon<T>) {
|
||||
export default function serializer<T>(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