mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Extract element functions into modules (#207)
This commit is contained in:
parent
e3eef04e00
commit
01805f734d
13 changed files with 547 additions and 474 deletions
7
src/element/typeChecks.ts
Normal file
7
src/element/typeChecks.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { ExcalidrawElement, ExcalidrawTextElement } from "./types";
|
||||
|
||||
export function isTextElement(
|
||||
element: ExcalidrawElement
|
||||
): element is ExcalidrawTextElement {
|
||||
return element.type === "text";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue