Skip to content

Latest commit

 

History

History
 
 

shared

Shared

This package contains utility functions, classes, types, etc. that are shared between the frontend and the backend.

Keep in mind to add new exports to the index.ts file in the folder.

Architecture

  • src/models/ classes, interfaces and types that are used in the state
    • Note that in all cases other than validation plain objects of these classes have to be used (instead of instance objects). You can use the create methods of all models for this.
  • src/store/ reducers, actions and utilities that are used with the state
  • src/utils/ general utilities
  • src/socket-api/ the types for socket.io
  • src/data/ data like default objects for the state or dummy objects for testing
  • src/state-helpers/ utilities for working with the state.

Updates to state types

Note that whenever the state types get updated you have to update ExerciseState.currentStateVersion in state.ts.