@@ -16,7 +16,7 @@ export interface ReactRuntime<R, ER> {
|
||||
|
||||
const ReactRuntimePrototype = Object.freeze({ [ReactRuntimeTypeId]: ReactRuntimeTypeId } as const)
|
||||
|
||||
export const preludeLayer: Layer.Layer<Component.ScopeMap> = Layer.mergeAll(Component.ScopeMap.layer)
|
||||
export const preludeLayer: Layer.Layer<Component.ScopeMap> = Component.ScopeMap.layer
|
||||
|
||||
export const isReactRuntime = (u: unknown): u is ReactRuntime<unknown, unknown> => Predicate.hasProperty(u, ReactRuntimeTypeId)
|
||||
|
||||
@@ -26,11 +26,11 @@ export const make = <R, ER>(
|
||||
): ReactRuntime<Layer.Success<typeof preludeLayer> | R, ER> => Object.setPrototypeOf(
|
||||
Object.assign(function() {}, {
|
||||
runtime: ManagedRuntime.make(
|
||||
Layer.merge(layer, preludeLayer),
|
||||
Layer.merge(preludeLayer, layer),
|
||||
{ memoMap },
|
||||
),
|
||||
// biome-ignore lint/style/noNonNullAssertion: context initialization
|
||||
context: React.createContext<Context.Context<R>>(null!),
|
||||
context: React.createContext<Context.Context<Layer.Success<typeof preludeLayer> | R>>(null!),
|
||||
}),
|
||||
ReactRuntimePrototype,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user