mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix
This commit is contained in:
parent
7087db42c0
commit
59e8bf498d
9 changed files with 109 additions and 65 deletions
|
@ -1,4 +1,4 @@
|
|||
import { ExcalidrawElement } from "../element/types";
|
||||
import { ExcalidrawElement, ExcalidrawGenericElement } from "../element/types";
|
||||
import {
|
||||
AppState,
|
||||
BinaryFiles,
|
||||
|
@ -7,6 +7,8 @@ import {
|
|||
} from "../types";
|
||||
import type { cleanAppStateForExport } from "../appState";
|
||||
import { VERSIONS } from "../constants";
|
||||
import { MarkOptional } from "../utility-types";
|
||||
import { ElementConstructorOpts } from "../element/newElement";
|
||||
|
||||
export interface ExportedDataState {
|
||||
type: string;
|
||||
|
@ -35,7 +37,28 @@ export interface ImportedDataState {
|
|||
type?: string;
|
||||
version?: number;
|
||||
source?: string;
|
||||
elements?: readonly ExcalidrawElement[] | null;
|
||||
elements?:
|
||||
| readonly (
|
||||
| (ExcalidrawElement & {
|
||||
children?: [
|
||||
{ text: string } & MarkOptional<
|
||||
ElementConstructorOpts,
|
||||
"x" | "y"
|
||||
>,
|
||||
];
|
||||
})
|
||||
| {
|
||||
type: Exclude<ExcalidrawGenericElement["type"], "selection">;
|
||||
children?: [
|
||||
{ text: string } & MarkOptional<
|
||||
ElementConstructorOpts,
|
||||
"x" | "y"
|
||||
>,
|
||||
] &
|
||||
MarkOptional<ElementConstructorOpts, "x" | "y">;
|
||||
}
|
||||
)[]
|
||||
| null;
|
||||
appState?: Readonly<
|
||||
Partial<
|
||||
AppState & {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue