This commit is contained in:
Nathan Bierema 2025-03-05 16:49:44 -05:00
parent f6f5d954e4
commit 57d5e08756
7 changed files with 35 additions and 26 deletions

View File

@ -1,4 +1,11 @@
import * as Immutable from 'immutable';
import {
fromJS,
Map as ImmutableMap,
List,
Set as ImmutableSet,
Stack,
Seq,
} from 'immutable';
import shuffle from 'lodash.shuffle';
import { combineReducers, Reducer } from 'redux';
@ -18,17 +25,14 @@ const NESTED = {
},
};
const IMMUTABLE_NESTED = Immutable.fromJS(NESTED) as Immutable.Map<
unknown,
unknown
>;
const IMMUTABLE_NESTED = fromJS(NESTED) as ImmutableMap<unknown, unknown>;
const IMMUTABLE_MAP = Immutable.Map({
map: Immutable.Map({ a: 1, b: 2, c: 3 }),
list: Immutable.List(['a', 'b', 'c']),
set: Immutable.Set(['a', 'b', 'c']),
stack: Immutable.Stack(['a', 'b', 'c']),
seq: Immutable.Seq([1, 2, 3, 4, 5, 6, 7, 8]),
const IMMUTABLE_MAP = ImmutableMap({
map: ImmutableMap({ a: 1, b: 2, c: 3 }),
list: List(['a', 'b', 'c']),
set: ImmutableSet(['a', 'b', 'c']),
stack: Stack(['a', 'b', 'c']),
seq: Seq([1, 2, 3, 4, 5, 6, 7, 8]),
});
const HUGE_ARRAY = Array.from({ length: 5000 }).map((_, key) => ({

View File

@ -1,4 +1,11 @@
import * as Immutable from 'immutable';
import {
fromJS,
Map as ImmutableMap,
List,
Set as ImmutableSet,
Stack,
Seq,
} from 'immutable';
import shuffle from 'lodash.shuffle';
import { combineReducers, Reducer } from 'redux';
@ -18,17 +25,14 @@ const NESTED = {
},
};
const IMMUTABLE_NESTED = Immutable.fromJS(NESTED) as Immutable.Map<
unknown,
unknown
>;
const IMMUTABLE_NESTED = fromJS(NESTED) as ImmutableMap<unknown, unknown>;
const IMMUTABLE_MAP = Immutable.Map({
map: Immutable.Map({ a: 1, b: 2, c: 3 }),
list: Immutable.List(['a', 'b', 'c']),
set: Immutable.Set(['a', 'b', 'c']),
stack: Immutable.Stack(['a', 'b', 'c']),
seq: Immutable.Seq([1, 2, 3, 4, 5, 6, 7, 8]),
const IMMUTABLE_MAP = ImmutableMap({
map: ImmutableMap({ a: 1, b: 2, c: 3 }),
list: List(['a', 'b', 'c']),
set: ImmutableSet(['a', 'b', 'c']),
stack: Stack(['a', 'b', 'c']),
seq: Seq([1, 2, 3, 4, 5, 6, 7, 8]),
});
type MapValue =

View File

@ -1,5 +1,5 @@
import jsan from 'jsan';
import * as Immutable from 'immutable';
import type Immutable from 'immutable';
import serialize from './serialize';
import options from '../constants/options';

View File

@ -1,4 +1,4 @@
import * as Immutable from 'immutable';
import type Immutable from 'immutable';
import { Record } from 'immutable';
import { mark, extract, refer } from '../helpers';
import options from '../constants/options';

View File

@ -2,6 +2,7 @@ import * as Immutable from 'immutable';
import { Map, OrderedMap } from 'immutable';
import Serialize from '../src/immutable';
import { SerializedData } from '../src/helpers';
const serialize = Serialize(Immutable);
const stringify = serialize.stringify;
const parse = serialize.parse;

View File

@ -1,7 +1,7 @@
import jsan from 'jsan';
import { immutableSerialize } from '@redux-devtools/serialize';
import { Action } from 'redux';
import * as Immutable from 'immutable';
import type Immutable from 'immutable';
import { PerformAction } from '@redux-devtools/core';
interface State {

View File

@ -2,7 +2,7 @@ import getParams from 'get-params';
import jsan from 'jsan';
import { nanoid } from 'nanoid/non-secure';
import { immutableSerialize } from '@redux-devtools/serialize';
import * as Immutable from 'immutable';
import type Immutable from 'immutable';
import { Action, ActionCreator } from 'redux';
export function generateId(id: string | undefined) {