Mayo commited on
Commit
f7f2ea1
·
unverified ·
1 Parent(s): 06cec08

fix: types mismatch

Browse files
ui/hooks/useBlockContextMenu.ts CHANGED
@@ -6,7 +6,7 @@ import { Document } from '@/types'
6
  import type { PointerToDocumentFn } from '@/hooks/usePointerToDocument'
7
 
8
  type BlockContextMenuOptions = {
9
- currentDocument?: Document
10
  pointerToDocument: PointerToDocumentFn
11
  selectBlock: (index?: number) => void
12
  removeBlock: (index: number) => void
 
6
  import type { PointerToDocumentFn } from '@/hooks/usePointerToDocument'
7
 
8
  type BlockContextMenuOptions = {
9
+ currentDocument: Document | null
10
  pointerToDocument: PointerToDocumentFn
11
  selectBlock: (index?: number) => void
12
  removeBlock: (index: number) => void
ui/hooks/useBlockDrafting.ts CHANGED
@@ -10,7 +10,7 @@ import type {
10
 
11
  type BlockDraftingOptions = {
12
  mode: ToolMode
13
- currentDocument?: Document
14
  pointerToDocument: PointerToDocumentFn
15
  clearSelection: () => void
16
  onCreateBlock: (block: TextBlock) => void
 
10
 
11
  type BlockDraftingOptions = {
12
  mode: ToolMode
13
+ currentDocument: Document | null
14
  pointerToDocument: PointerToDocumentFn
15
  clearSelection: () => void
16
  onCreateBlock: (block: TextBlock) => void
ui/hooks/useBrushLayerDisplay.ts CHANGED
@@ -5,7 +5,7 @@ import { convertToImageBitmap } from '@/lib/util'
5
  import { Document } from '@/types'
6
 
7
  type BrushLayerDisplayOptions = {
8
- currentDocument?: Document
9
  visible: boolean
10
  }
11
 
 
5
  import { Document } from '@/types'
6
 
7
  type BrushLayerDisplayOptions = {
8
+ currentDocument: Document | null
9
  visible: boolean
10
  }
11
 
ui/hooks/useMaskDrawing.ts CHANGED
@@ -12,7 +12,7 @@ import {
12
 
13
  type MaskDrawingOptions = {
14
  mode: ToolMode
15
- currentDocument?: Document
16
  pointerToDocument: PointerToDocumentFn
17
  showMask: boolean
18
  enabled: boolean
 
12
 
13
  type MaskDrawingOptions = {
14
  mode: ToolMode
15
+ currentDocument: Document | null
16
  pointerToDocument: PointerToDocumentFn
17
  showMask: boolean
18
  enabled: boolean
ui/hooks/useRenderBrushDrawing.ts CHANGED
@@ -11,7 +11,7 @@ import {
11
 
12
  type RenderBrushOptions = {
13
  mode: ToolMode
14
- currentDocument?: Document
15
  pointerToDocument: PointerToDocumentFn
16
  enabled: boolean
17
  action: 'paint' | 'erase'
 
11
 
12
  type RenderBrushOptions = {
13
  mode: ToolMode
14
+ currentDocument: Document | null
15
  pointerToDocument: PointerToDocumentFn
16
  enabled: boolean
17
  action: 'paint' | 'erase'