tldraw/state/sessions/base-session.ts
2021-05-10 13:16:57 +01:00

17 lines
315 B
TypeScript

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
}
}