Signal drop!
Relay (operand.online) is unreachable.
Usually, a dropped signal means an upgrade is happening. Hold on!
Sorry, no connección.
Hang in there while we get back on track
gram: essay
> ./src/datatypes.ts
Lenses
(coming soon!)
import { TLDrawDatatype } from "./tldraw/datatype";
import { EssayDatatype } from "./tee/datatype";
import { FolderDatatype } from "./folders/datatype";
import { Repo } from "@automerge/automerge-repo";
// TODO: make this generically typed
export interface DataType {
id: string;
name: string;
icon: any;
init: (doc: any, repo: Repo) => void;
getTitle: (doc: any) => string;
setTitle?: (doc: any, title: string) => void;
markCopy: (doc: any) => void;
}
export const datatypes: Record<string, DataType> = {
essay: EssayDatatype,
tldraw: TLDrawDatatype,
folder: FolderDatatype,
} as const;
export type DatatypeId = keyof typeof datatypes;