Options
All
  • Public
  • Public/Protected
  • All
Menu

Package core

📽 PJControl API

This project was bootstrapped with TSDX.

Local Development

Below is a list of commands you will probably find useful.

npm start or yarn start

Runs 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 build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

Index

References

ActionParameters

Re-exports ActionParameters

ActionParameters

Re-exports ActionParameters

AppThunk

Re-exports AppThunk

AppThunk

Re-exports AppThunk

FetchableValue

Re-exports FetchableValue

FetchableValue

Re-exports FetchableValue

GlobalState

Re-exports GlobalState

GlobalState

Re-exports GlobalState

Hub

Re-exports Hub

Hub

Re-exports Hub

Notification

Re-exports Notification

Notification

Re-exports Notification

Port

Re-exports Port

Port

Re-exports Port

ProjectorConnectionStatus

Re-exports ProjectorConnectionStatus

ProjectorConnectionStatus

Re-exports ProjectorConnectionStatus

ProjectorPowerState

Re-exports ProjectorPowerState

ProjectorPowerState

Re-exports ProjectorPowerState

ProjectorShutterState

Re-exports ProjectorShutterState

ProjectorShutterState

Re-exports ProjectorShutterState

ProjectorState

Re-exports ProjectorState

ProjectorState

Re-exports ProjectorState

ProjectorsSlice

Re-exports ProjectorsSlice

ProjectorsSlice

Re-exports ProjectorsSlice

addProjectorInit

Re-exports addProjectorInit

addProjectorInit

Re-exports addProjectorInit

createStore

Re-exports createStore

createStore

Re-exports createStore

projectorSliceReducer

Re-exports projectorSliceReducer

projectorSliceReducer

Re-exports projectorSliceReducer

removeProjectorUpdate

Re-exports removeProjectorUpdate

removeProjectorUpdate

Re-exports removeProjectorUpdate

rootReducer

Re-exports rootReducer

rootReducer

Re-exports rootReducer

updateProjector

Re-exports updateProjector

updateProjector

Re-exports updateProjector

Type aliases

AppThunk

AppThunk<ReturnType>: ThunkAction<ReturnType, GlobalState, Hub, Action<string>>

Type parameters

  • ReturnType

FetchableValue

FetchableValue<V>: { isFetching: boolean; lastFetchedAt?: number; value?: V }

Type parameters

  • V

Type declaration

  • isFetching: boolean
  • Optional lastFetchedAt?: number
  • Optional value?: V

GlobalState

GlobalState: { projectors: {} }

Type declaration

Notification

Notification: { error: boolean; message: string | null }

Type declaration

  • error: boolean
  • message: string | null

ProjectorState

ProjectorState: { connection: { ip: string; port: number; status: ProjectorConnectionStatus }; device?: { family?: string | null; manufacturer?: string | null; model?: string | null }; hardware?: { power?: FetchableValue<ProjectorPowerState>; shutter?: FetchableValue<ProjectorShutterState> }; id: string; metadata?: {}; notification?: Notification }

Type declaration

ProjectorsSlice

ProjectorsSlice: {}

Type declaration

Variables

actions

actions: { addProjectorInit: ActionCreatorWithOptionalPayload<{ connection: { ip: string; port: number; status: ProjectorConnectionStatus }; device?: { family?: string | null; manufacturer?: string | null; model?: string | null }; hardware?: { power?: FetchableValue<ProjectorPowerState>; shutter?: FetchableValue<ProjectorShutterState> }; id: string; metadata?: {}; notification?: Notification }, string>; removeProjectorUpdate: ActionCreatorWithOptionalPayload<{ id: string }, string>; updateProjector: ActionCreatorWithOptionalPayload<{ id: string } & {}, string> }

Type declaration

  • addProjectorInit: ActionCreatorWithOptionalPayload<{ connection: { ip: string; port: number; status: ProjectorConnectionStatus }; device?: { family?: string | null; manufacturer?: string | null; model?: string | null }; hardware?: { power?: FetchableValue<ProjectorPowerState>; shutter?: FetchableValue<ProjectorShutterState> }; id: string; metadata?: {}; notification?: Notification }, string>
  • removeProjectorUpdate: ActionCreatorWithOptionalPayload<{ id: string }, string>
  • updateProjector: ActionCreatorWithOptionalPayload<{ id: string } & {}, string>

addProjectorInit

addProjectorInit: ActionCreatorWithOptionalPayload<{ connection: { ip: string; port: number; status: ProjectorConnectionStatus }; device?: { family?: string | null; manufacturer?: string | null; model?: string | null }; hardware?: { power?: FetchableValue<ProjectorPowerState>; shutter?: FetchableValue<ProjectorShutterState> }; id: string; metadata?: {}; notification?: Notification }, string>

Const initialState

initialState: ProjectorsSlice

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;},},})

removeProjectorUpdate

removeProjectorUpdate: ActionCreatorWithOptionalPayload<{ id: string }, string>

updateProjector

updateProjector: ActionCreatorWithOptionalPayload<{ id: string } & {}, string>

Generated using TypeDoc