mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
make image attributes optional and better ts check
This commit is contained in:
parent
bdb84b01ca
commit
bf3afc34ed
3 changed files with 45 additions and 40 deletions
|
@ -134,7 +134,6 @@ export interface ExcalidrawProgrammaticAPI {
|
|||
| Extract<
|
||||
ExcalidrawElement,
|
||||
| ExcalidrawSelectionElement
|
||||
| ExcalidrawImageElement
|
||||
| ExcalidrawFreeDrawElement
|
||||
| ExcalidrawFrameElement
|
||||
>
|
||||
|
@ -152,6 +151,11 @@ export interface ExcalidrawProgrammaticAPI {
|
|||
y: number;
|
||||
id?: ExcalidrawTextElement["id"];
|
||||
} & Partial<ExcalidrawTextElement>)
|
||||
| ({
|
||||
type: Extract<ExcalidrawImageElement["type"], "image">;
|
||||
x: number;
|
||||
y: number;
|
||||
} & Partial<ExcalidrawImageElement>)
|
||||
)[]
|
||||
| null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue