Spaces:
Sleeping
Sleeping
Download node_modules/@reduxjs/toolkit/src/query/utils/getCurrent.ts from Scribbler310/gs-port: direct link, hf CLI and curl.
- Browser
- Download file 207 Bytes
-
https://huggingface.co/spaces/Scribbler310/gs-port/resolve/main/node_modules/%40reduxjs/toolkit/src/query/utils/getCurrent.ts
- Command line
-
hf download hf://spaces/Scribbler310/gs-port/node_modules/@reduxjs/toolkit/src/query/utils/getCurrent.ts
-
curl -L -o getCurrent.ts https://huggingface.co/spaces/Scribbler310/gs-port/resolve/main/node_modules/%40reduxjs/toolkit/src/query/utils/getCurrent.ts
207 Bytes
| 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 | |
| } | |