diff --git a/packages/frontend-core/src/components/grid/stores/columns.ts b/packages/frontend-core/src/components/grid/stores/columns.ts index 7831305e1b..9a85918d6d 100644 --- a/packages/frontend-core/src/components/grid/stores/columns.ts +++ b/packages/frontend-core/src/components/grid/stores/columns.ts @@ -1,7 +1,7 @@ import { derived, get, Readable, Writable, writable } from "svelte/store" import { DefaultColumnWidth, GutterWidth } from "../lib/constants" import { CalculationType, FieldSchema } from "@budibase/types" -import { StoreContext } from "." +import { Store as StoreContext } from "." export interface Store { columns: Writable diff --git a/packages/frontend-core/src/components/grid/stores/index.ts b/packages/frontend-core/src/components/grid/stores/index.ts index fdbd6b4f91..602dfa969a 100644 --- a/packages/frontend-core/src/components/grid/stores/index.ts +++ b/packages/frontend-core/src/components/grid/stores/index.ts @@ -50,7 +50,16 @@ const DependencyOrderedStores = [ Cache, ] -export const attachStores = context => { +export type Store = Columns.Store & + Columns.DerivedStore & { + // TODO while typing the rest of stores + datasource: any + definition: Writable + displayColumn: Writable + enrichedSchema: any + } + +export const attachStores = (context): Store => { // Atomic store creation for (let store of DependencyOrderedStores) { context = { ...context, ...store.createStores?.(context) } @@ -73,11 +82,3 @@ export const attachStores = context => { return context } - -export interface StoreContext { - columns: Columns.Store["columns"] - datasource: any - definition: Writable - displayColumn: Writable - enrichedSchema: any -}