Files
NapCatQQ/.pnpm-store/v3/files/46/558b520294e4a78e578a62ff97414ed477b7c9db44f4d71d089e5299ce5f64191faeaf89061cfb9ba3709489ec4555361797fa4a34edaff5cf476bb37a7986
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

7 lines
207 B
Plaintext

import type { Draft } from 'immer'
import { current, isDraft } from '../utils/immerImports'
export function getCurrent<T>(value: T | Draft<T>): T {
return (isDraft(value) ? current(value) : value) as T
}