From f5d8f8f06b6a270f226f323370c137b6936d2e2b Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Mon, 5 Feb 2024 13:22:40 +0000 Subject: [PATCH] pure some things --- packages/toolkit/src/createSlice.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index 441fbbcc6a..6ab32a3d27 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -28,11 +28,13 @@ import type { import { createAsyncThunk as _createAsyncThunk } from './createAsyncThunk' import { emplace } from './utils' -const asyncThunkSymbol = Symbol.for('rtk-slice-createasyncthunk') +const asyncThunkSymbol = /* @__PURE__ */ Symbol.for( + 'rtk-slice-createasyncthunk', +) // type is annotated because it's too long to infer export const asyncThunkCreator: { [asyncThunkSymbol]: typeof _createAsyncThunk -} = { +} = /* @__PURE__ */ { [asyncThunkSymbol]: _createAsyncThunk, } @@ -863,7 +865,7 @@ function wrapSelector>( * * @public */ -export const createSlice = buildCreateSlice() +export const createSlice = /* @__PURE__ */ buildCreateSlice() interface ReducerHandlingContext { sliceCaseReducersByName: Record<