diff --git a/src/components/App.tsx b/src/components/App.tsx index cce721cb..7f127c37 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -55,10 +55,9 @@ import { import Portal from "./Portal"; import { renderScene } from "../renderer"; -import { AppState, GestureEvent, Gesture } from "../types"; +import { AppState, GestureEvent, Gesture, ExcalidrawProps } from "../types"; import { ExcalidrawElement, - ExcalidrawProps, ExcalidrawTextElement, NonDeleted, ExcalidrawGenericElement, @@ -126,7 +125,7 @@ import { LOCAL_STORAGE_KEY_COLLAB_FORCE_FLAG, } from "../constants"; import { - INITAL_SCENE_UPDATE_TIMEOUT, + INITIAL_SCENE_UPDATE_TIMEOUT, TAP_TWICE_TIMEOUT, SYNC_FULL_SCENE_INTERVAL_MS, TOUCH_CTX_MENU_TIMEOUT, @@ -247,7 +246,7 @@ class App extends React.Component { height: window.innerHeight, }; - constructor(props: any) { + constructor(props: ExcalidrawProps) { super(props); const defaultAppState = getDefaultAppState(); @@ -1035,7 +1034,7 @@ class App extends React.Component { // initial SCENE_UPDATE message const initializationTimer = setTimeout( initialize, - INITAL_SCENE_UPDATE_TIMEOUT, + INITIAL_SCENE_UPDATE_TIMEOUT, ); const updateScene = ( diff --git a/src/element/types.ts b/src/element/types.ts index ffba4b12..de5a9f3c 100644 --- a/src/element/types.ts +++ b/src/element/types.ts @@ -77,8 +77,3 @@ export type VerticalAlign = "top" | "middle"; export type FontFamily = keyof typeof FONT_FAMILY; export type FontString = string & { _brand: "fontString" }; - -export interface ExcalidrawProps { - width: number; - height: number; -} diff --git a/src/time_constants.ts b/src/time_constants.ts index 96400d61..27423b8f 100644 --- a/src/time_constants.ts +++ b/src/time_constants.ts @@ -1,5 +1,5 @@ // time in milliseconds export const TAP_TWICE_TIMEOUT = 300; -export const INITAL_SCENE_UPDATE_TIMEOUT = 5000; +export const INITIAL_SCENE_UPDATE_TIMEOUT = 5000; export const SYNC_FULL_SCENE_INTERVAL_MS = 20000; export const TOUCH_CTX_MENU_TIMEOUT = 500; diff --git a/src/types.ts b/src/types.ts index f6c16a36..9dd59523 100644 --- a/src/types.ts +++ b/src/types.ts @@ -107,3 +107,8 @@ export type SocketUpdateData = SocketUpdateDataSource[keyof SocketUpdateDataSour }; export type LibraryItems = readonly NonDeleted[][]; + +export interface ExcalidrawProps { + width: number; + height: number; +}