Skip to content

Instantly share code, notes, and snippets.

@quantumproducer
quantumproducer / class Component
Created July 13, 2017 13:06
class Component
class Component {
constructor(o) {
this.components = {};
this.listeners = {};
}
init(o) {
}
@cowboyd
cowboyd / operation-state.ts
Created November 3, 2020 20:02
A POJO representing an operation state
type OperationState<T> = {
status: 'unstarted';
} | {
status: 'started';
} | {
status: 'running';
isRunning: true;
} | {
status: 'completed';
value: T;