Skip to content

Commit e31bcc1

Browse files
committed
matrix typescript error
1 parent a06a575 commit e31bcc1

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/matrix/matrix.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ import { solidLogicSingleton } from 'solid-logic'
2626

2727
const kb = solidLogicSingleton.store
2828

29+
type MatrixQuery = object
30+
31+
type MatrixVariable = {
32+
toString: () => string
33+
}
34+
2935
export function matrixForQuery (
3036
dom: HTMLDocument,
31-
query: $rdf.Query,
32-
vx: $rdf.Variable,
33-
vy: $rdf.Variable,
34-
vvalue: $rdf.Variable,
37+
query: MatrixQuery,
38+
vx: MatrixVariable,
39+
vy: MatrixVariable,
40+
vvalue: MatrixVariable,
3541
options: MatrixOptions,
3642
whenDone: () => void
3743
) {
@@ -220,7 +226,7 @@ export function matrixForQuery (
220226

221227
matrix.refresh = function () {
222228
markOldCells()
223-
kb.query(query, addCellFromBindings, undefined, clearOldCells)
229+
kb.query(query as any, addCellFromBindings, undefined, clearOldCells)
224230
}
225231

226232
const addCellFromBindings = function (bindings) {
@@ -245,6 +251,6 @@ export function matrixForQuery (
245251
}
246252
}
247253

248-
kb.query(query, addCellFromBindings, undefined, whenDone) // Populate the matrix
254+
kb.query(query as any, addCellFromBindings, undefined, whenDone) // Populate the matrix
249255
return matrix
250256
}

0 commit comments

Comments
 (0)