source:
node_modules/@reduxjs/toolkit/src/query/utils/getCurrent.ts
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 207 bytes | |
| Line | |
|---|---|
| 1 | import type { Draft } from 'immer' |
| 2 | import { current, isDraft } from '../utils/immerImports' |
| 3 | |
| 4 | export function getCurrent<T>(value: T | Draft<T>): T { |
| 5 | return (isDraft(value) ? current(value) : value) as T |
| 6 | } |
Note:
See TracBrowser
for help on using the repository browser.
