Const projectorsSlice
projectorsSlice: Slice<{}, { addProjectorInit: any; removeProjectorUpdate: any; updateProjector: any }, "projectors"> = createSlice({name: 'projectors',initialState,reducers: {addProjectorInit: (state, action: PayloadAction<ProjectorState>) => {state[action.payload.id] = action.payload;return state;},updateProjector: (state,action: PayloadAction<{ id: string } & DeepPartial<ProjectorState>>) => {const { id, ...projectorUpdates } = action.payload;if (id in state) {state[id] = _.merge(state[id], projectorUpdates);}return state;},removeProjectorUpdate: (state, action: PayloadAction<{ id: string }>) => {delete state[action.payload.id];return state;},},})
📽 PJControl API
This project was bootstrapped with TSDX.
Local Development
Below is a list of commands you will probably find useful.
npm startoryarn startRuns the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.
Your library will be rebuilt if you make edits.
npm run buildoryarn buildBundles the package to the
distfolder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).npm testoryarn testRuns the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.