Rewrite restore to guard against missing migrations (#1664)

This commit is contained in:
David Luzar 2020-05-28 11:41:34 +02:00 committed by GitHub
parent 56f8bc092d
commit 44a88d2d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 131 additions and 117 deletions

View file

@ -24,12 +24,17 @@ type _ExcalidrawElementBase = Readonly<{
groupIds: GroupId[];
}>;
export type ExcalidrawSelectionElement = _ExcalidrawElementBase & {
type: "selection";
};
/**
* These are elements that don't have any additional properties.
*/
export type ExcalidrawGenericElement = _ExcalidrawElementBase & {
type: "selection" | "rectangle" | "diamond" | "ellipse";
};
export type ExcalidrawGenericElement =
| ExcalidrawSelectionElement
| (_ExcalidrawElementBase & {
type: "rectangle" | "diamond" | "ellipse";
});
/**
* ExcalidrawElement should be JSON serializable and (eventually) contain