@ethora/chat-component
Version:
1. npm create vite@latest 2. select name of project, select type (react/js) 3. cd project-name 4. npm i 5. npm i @ethora/chat-component 6. go to file src/App.tsx and replace it with this code
14 lines (13 loc) • 1.15 kB
TypeScript
import { PayloadAction } from '@reduxjs/toolkit';
import { IMessage } from '../types/types';
interface roomHeapSliceState {
messageHeap: IMessage[];
}
export declare const roomHeapSlice: import('@reduxjs/toolkit').Slice<roomHeapSliceState, {
addMessageToHeap: (state: import('immer').WritableDraft<roomHeapSliceState>, action: PayloadAction<IMessage>) => void;
removeMessageFromHeapById: (state: import('immer').WritableDraft<roomHeapSliceState>, action: PayloadAction<string>) => void;
clearHeap: (state: import('immer').WritableDraft<roomHeapSliceState>) => void;
}, "roomHeapStore", "roomHeapStore", import('@reduxjs/toolkit').SliceSelectors<roomHeapSliceState>>;
export declare const addMessageToHeap: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<IMessage, "roomHeapStore/addMessageToHeap">, removeMessageFromHeapById: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "roomHeapStore/removeMessageFromHeapById">, clearHeap: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"roomHeapStore/clearHeap">;
declare const _default: import('redux').Reducer<roomHeapSliceState>;
export default _default;