tldraw/state/sessions/base-session.ts

18 lines
315 B
TypeScript
Raw Normal View History

2021-05-10 12:16:57 +00:00
import { Data } from "types"
export default class BaseSession {
constructor(data: Data) {}
update = (data: Data, ...args: unknown[]) => {
// Update the state
}
complete = (data: Data, ...args: unknown[]) => {
// Create a command
}
cancel = (data: Data) => {
// Clean up the change
}
}