File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -131,9 +131,9 @@ export function isListening() {
131131
132132// context API
133133
134- interface Context { id : symbol , initFn : Function } ;
134+ export interface Context { id : symbol , initFn ? : Function } ;
135135
136- export function createContext ( initFn : any ) {
136+ export function createContext ( initFn ?: Function ) : Context {
137137 const id = Symbol ( 'context' ) ;
138138 return { id, initFn } ;
139139}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export const SuspenseContext = createContext(() => {
1919// used in the runtime to seed the Suspend control flow
2020export function registerSuspense ( fn : ( o : { suspended : ( ) => any , initializing : boolean } ) => void ) {
2121 createEffect ( ( ) => {
22- const c = SuspenseContext . initFn ( ) ;
22+ const c = ( SuspenseContext . initFn as Function ) ( ) ;
2323 setContext ( SuspenseContext . id , c ) ;
2424 fn ( c ) ;
2525 c . initializing = false ;
You can’t perform that action at this time.
0 commit comments