https://github.com/codevideo/codevideo-types
TypeScript types used around the CodeVideo ecosystem.
https://github.com/codevideo/codevideo-types
Last synced: 12 months ago
JSON representation
TypeScript types used around the CodeVideo ecosystem.
- Host: GitHub
- URL: https://github.com/codevideo/codevideo-types
- Owner: codevideo
- Created: 2024-03-13T09:20:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T20:53:35.000Z (over 1 year ago)
- Last Synced: 2025-03-24T09:51:40.521Z (about 1 year ago)
- Language: TypeScript
- Size: 143 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# codevideo-types

TypeScript types used around the CodeVideo ecosystem.
## Theory
A software course is represented by the top level interface [`ICourse`](/src/interfaces/toplevel/ICourse.ts). A course is made up of an array of [`ILessons`](./src/interfaces/toplevel/ILesson.ts), which are made up of a series of [`IActions`](./src/interfaces/toplevel/IAction.ts). Each of `ICourse`, `ILesson`, and `IAction` also have additional metadata properties.
Read more about this in [our whitepaper](https://studio.codevideo.io/pdf/CodeVideo_Framework_White_Paper.pdf).
### Domains
There are 5 domains to a codevideo action: the file explorer, the editor, the terminal, the mouse, and the author. Each of these domains has its own set of actions that can be performed with it, prefixed by `file-explorer-`, `editor-`, `terminal-`, `mouse-`, and `author-` respectively.
### IAction
[`IAction`](./src/interfaces/IAction.ts) - The bread and butter of all things CodeVideo. An action is defined by a `name` and a `value` and can perform all possible actions in the CodeVideo ecosystem. Examples include `type-editor`, `type-terminal`, `arrow-up`, `enter`, etc.
#### Action Names
A convenience array of all possible action names is available at [AllActionStrings](./src/constants/AllActionStrings.ts).
#### Action Values
Action values are always strings, but typically represent a number when they are repeatable actions such as `editor-arrow-up`, `editor-enter`, etc. These are catalogued in [RepeatableActionNames](./src/types/RepeatableActionNames.ts).
### Project Snapshots
A project snapshot is a snapshot of the state of a project at a given point in time. It is represented by the [`IProjectSnapshot`](./src/interfaces/IProjectSnapshot.ts) interface. Any instance of `IProjectSnapshot` can be derived by evaluating the actions in the project up to the point in time that the snapshot was taken.