File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 " .bmp.yml" ,
3131 " docs"
3232 ]
33- }
33+ },
34+ "lock" : false
3435}
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -152,7 +152,10 @@ export interface Context<EL = HTMLElement> {
152152 /** Subscribe to the signal. Unsubscribe it when the component unmounted */
153153 subscribe < T > ( signal : Signal < T > , handler : ( value : T ) => void ) : void
154154 /** Subscribe to the group signal. Unsubscribe it when the component unmounted */
155- subscribe < T > ( signal : GroupSignal < T > , handler : ( value : T ) => void ) : void
155+ subscribe < T extends Record < string , unknown > > (
156+ signal : GroupSignal < T > ,
157+ handler : ( value : T ) => void ,
158+ ) : void
156159}
157160
158161/** The component type */
@@ -289,8 +292,8 @@ export function register<EL extends HTMLElement>(
289292 onUnmount ( ( ) => document . removeEventListener ( type , listener ) )
290293 }
291294
292- const subscribe = < T > (
293- signal : Signal < unknown > | GroupSignal < unknown > ,
295+ const subscribe = < T extends Record < string , unknown > > (
296+ signal : Signal < unknown > | GroupSignal < T > ,
294297 handler : ( value : unknown ) => void ,
295298 ) => {
296299 onUnmount ( signal . subscribe ( handler ) )
You can’t perform that action at this time.
0 commit comments