Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
7 lines
207 B
Plaintext
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
|
|
}
|