@@ -4,4 +4,4 @@ import { FetchData } from "./services"
|
|||||||
|
|
||||||
|
|
||||||
export const GlobalContext = ReffuseContext.make<FetchData.FetchData>()
|
export const GlobalContext = ReffuseContext.make<FetchData.FetchData>()
|
||||||
export const Reffuse = make([GlobalContext])
|
export const Reffuse = make(GlobalContext)
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ import { PostsState } from "./services"
|
|||||||
|
|
||||||
|
|
||||||
export const PostsContext = ReffuseContext.make<PostsState.PostsState>()
|
export const PostsContext = ReffuseContext.make<PostsState.PostsState>()
|
||||||
export const Reffuse = make([GlobalContext, PostsContext])
|
export const Reffuse = make(GlobalContext, PostsContext)
|
||||||
|
|||||||
@@ -155,6 +155,6 @@ export interface RenderOptions {
|
|||||||
export const make = <
|
export const make = <
|
||||||
const Contexts extends readonly ReffuseContext.ReffuseContext<any>[]
|
const Contexts extends readonly ReffuseContext.ReffuseContext<any>[]
|
||||||
>(
|
>(
|
||||||
contexts: Contexts
|
...contexts: Contexts
|
||||||
): Reffuse<{ [K in keyof Contexts]: ReffuseContext.R<Contexts[K]> }[number]> =>
|
): Reffuse<{ [K in keyof Contexts]: ReffuseContext.R<Contexts[K]> }[number]> =>
|
||||||
new Reffuse(contexts)
|
new Reffuse(contexts)
|
||||||
|
|||||||
Reference in New Issue
Block a user