support id as well for elements

This commit is contained in:
Aakansha Doshi 2023-05-23 13:21:22 +05:30
parent b783b822d6
commit 75cfe54b15
2 changed files with 15 additions and 4 deletions

View file

@ -47,6 +47,7 @@ export interface ImportedDataState {
elements?:
| readonly (
| (ExcalidrawElement & {
id?: ExcalidrawElement["id"];
label?: {
text: string;
fontSize?: number;
@ -60,6 +61,7 @@ export interface ImportedDataState {
typeof ELEMENTS_SUPPORTING_PROGRAMMATIC_API[number],
"text"
>;
id?: ExcalidrawElement["id"];
label?: {
text: string;
fontSize?: number;
@ -82,11 +84,11 @@ export interface ImportedDataState {
verticalAlign?: VerticalAlign;
} & MarkOptional<ElementConstructorOpts, "x" | "y">;
start?: {
type: ExcalidrawBindableElement["type"] & ElementConstructorOpts;
};
type: ExcalidrawBindableElement["type"];
} & MarkOptional<ElementConstructorOpts, "x" | "y">;
end?: {
type: ExcalidrawBindableElement["type"] & ElementConstructorOpts;
};
type: ExcalidrawBindableElement["type"];
} & MarkOptional<ElementConstructorOpts, "x" | "y">;
} & ElementConstructorOpts)
)[]
| null;