0.1.0 #1

Merged
Thilawyn merged 87 commits from next into master 2025-01-18 00:54:42 +01:00
Showing only changes of commit cb798ad466 - Show all commits

View File

@@ -50,3 +50,20 @@ export type R<T> = T extends ReffuseContext<infer R> ? R : never
export function make<R = never>() {
return new ReffuseContext<R>()
}
export function useMergeMany<
const Contexts extends readonly ReffuseContext<any>[]
>(
contexts: Contexts
): {
[K in keyof Contexts]: R<Contexts[K]>
} {
}
const context1 = make<{ readonly service1: true }>()
const context2 = make<{ readonly service2: true }>()
const res = useMergeMany([context1, context2])