source: node_modules/@reduxjs/toolkit/src/query/utils/getCurrent.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 207 bytes
Line 
1import type { Draft } from 'immer'
2import { current, isDraft } from '../utils/immerImports'
3
4export 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.