Tests
Some checks failed
Lint / lint (push) Failing after 10s

This commit is contained in:
Julien Valverdé
2025-01-15 01:54:27 +01:00
parent 75c3ad31d0
commit cb798ad466

View File

@@ -50,3 +50,20 @@ export type R<T> = T extends ReffuseContext<infer R> ? R : never
export function make<R = never>() { export function make<R = never>() {
return new ReffuseContext<R>() 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])