diff --git a/packages/frontend-core/src/components/grid/stores/viewport.js b/packages/frontend-core/src/components/grid/stores/viewport.ts similarity index 87% rename from packages/frontend-core/src/components/grid/stores/viewport.js rename to packages/frontend-core/src/components/grid/stores/viewport.ts index 0797f38b55..3cc5c11000 100644 --- a/packages/frontend-core/src/components/grid/stores/viewport.js +++ b/packages/frontend-core/src/components/grid/stores/viewport.ts @@ -1,7 +1,15 @@ -import { derived } from "svelte/store" +import { derived, Readable } from "svelte/store" import { MinColumnWidth } from "../lib/constants" +import { Store as StoreContext } from "." -export const deriveStores = context => { +interface ViewportDerivedStore { + scrolledRowCount: Readable + visualRowCapacity: Readable + renderedRows: Readable + columnRenderMap: Readable +} + +export const deriveStores = (context: StoreContext): ViewportDerivedStore => { const { rowHeight, scrollableColumns,