Extract element functions into modules (#207)
This commit is contained in:
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";
|
||||
}
|
Reference in New Issue
Block a user