Cleanup types

This commit is contained in:
Adria Navarro 2024-12-30 12:47:09 +01:00
parent 6d1f2c9200
commit 9d1d4d0abf
2 changed files with 8 additions and 21 deletions

View File

@ -3,21 +3,8 @@ import { derived, Readable } from "svelte/store"
import { ViewV2Type } from "@budibase/types"
import { BaseStoreProps, Store as StoreContext } from "."
interface ConfigStore {
datasource: Readable<BaseStoreProps["datasource"]>
initialSortColumn: Readable<BaseStoreProps["initialSortColumn"]>
initialSortOrder: Readable<BaseStoreProps["initialSortOrder"]>
initialFilter: Readable<BaseStoreProps["initialFilter"]>
fixedRowHeight: Readable<BaseStoreProps["fixedRowHeight"]>
schemaOverrides: Readable<BaseStoreProps["schemaOverrides"]>
notifySuccess: Readable<BaseStoreProps["notifySuccess"]>
notifyError: Readable<BaseStoreProps["notifyError"]>
canAddRows?: Readable<BaseStoreProps["canAddRows"]>
canEditRows?: Readable<BaseStoreProps["canEditRows"]>
canDeleteRows?: Readable<BaseStoreProps["canDeleteRows"]>
canEditColumns?: Readable<BaseStoreProps["canEditColumns"]>
canExpandRows?: Readable<BaseStoreProps["canExpandRows"]>
canSaveSchema?: Readable<BaseStoreProps["canSaveSchema"]>
type ConfigStore = {
[key in keyof BaseStoreProps]: Readable<BaseStoreProps[key]>
}
interface ConfigDerivedStore {

View File

@ -67,12 +67,12 @@ export interface BaseStoreProps {
> | null
notifySuccess: (message: string) => void
notifyError: (message: string) => void
canAddRows: boolean
canEditRows: boolean
canDeleteRows: boolean
canEditColumns: boolean
canExpandRows: boolean
canSaveSchema: boolean
canAddRows?: boolean
canEditRows?: boolean
canDeleteRows?: boolean
canEditColumns?: boolean
canExpandRows?: boolean
canSaveSchema?: boolean
}
export interface BaseStore {