Type derived store
This commit is contained in:
parent
b0e5858768
commit
5b2edc0630
|
@ -1,4 +1,4 @@
|
||||||
import { writable, get, derived, Writable } from "svelte/store"
|
import { writable, get, derived, Writable, Readable } from "svelte/store"
|
||||||
import { tick } from "svelte"
|
import { tick } from "svelte"
|
||||||
import {
|
import {
|
||||||
DefaultRowHeight,
|
DefaultRowHeight,
|
||||||
|
@ -31,15 +31,15 @@ export interface UIStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UIDerivedStore {
|
export interface UIDerivedStore {
|
||||||
focusedRowId: Writable<string | null>
|
focusedRowId: Readable<string | null>
|
||||||
focusedRow: Writable<any>
|
focusedRow: Readable<string | undefined>
|
||||||
contentLines: Writable<any>
|
contentLines: Readable<3 | 2 | 1>
|
||||||
compact: Writable<any>
|
compact: Readable<boolean>
|
||||||
selectedRowCount: Writable<any>
|
selectedRowCount: Readable<number>
|
||||||
isSelectingCells: Writable<any>
|
isSelectingCells: Readable<boolean>
|
||||||
selectedCells: Writable<any> & { actions: any }
|
selectedCells: Readable<string[][]> & { actions: any }
|
||||||
selectedCellMap: Writable<any>
|
selectedCellMap: Readable<Record<string, boolean>>
|
||||||
selectedCellCount: Writable<any>
|
selectedCellCount: Readable<number>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Store = UIStore & UIDerivedStore
|
export type Store = UIStore & UIDerivedStore
|
||||||
|
|
Loading…
Reference in New Issue