File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ export function useSignalListeners(
4848 id : string | undefined ,
4949 onChange : ComponentChangeHandler ,
5050) : { [ key : string ] : SignalHandler } {
51+ /*
52+ This is a partial representation of the parameter type from
53+ SelectionParameter type from the `vega-lite` module. Since we are
54+ only interested in extracting the handlers, the following
55+ properties are required.
56+ */
57+ type SelectionParameter = { name : string ; select : { on : string } } ;
5158 /*
5259 Here, we create map of signals which will be then used to create the
5360 map of signal-listeners because not all params are event-listeners, and we
@@ -60,7 +67,7 @@ export function useSignalListeners(
6067 if ( ! chart . params ) return { } ;
6168 return chart . params
6269 . filter (
63- ( param ) : param is { name : string ; select : { on : string } } =>
70+ ( param ) : param is SelectionParameter =>
6471 isObject ( param ) &&
6572 param !== null &&
6673 "name" in param &&
You can’t perform that action at this time.
0 commit comments