Add Effect v4 support, Fast Refresh tooling, and revamped docs #56
@@ -1,7 +1,11 @@
|
|||||||
import { type Cause, Chunk, Context, DateTime, type Duration, Effect, Equal, Exit, HashMap, Layer, Option, Order, Scope, Semaphore, Stream, SubscriptionRef } from "effect"
|
import { type Cause, Chunk, Context, DateTime, type Duration, Effect, Equal, Exit, HashMap, Layer, Option, Order, Predicate, Scope, Semaphore, Stream, SubscriptionRef } from "effect"
|
||||||
|
|
||||||
|
|
||||||
|
export const ScopeRegistryServiceTypeId: unique symbol = Symbol.for("@effect-view/ScopeRegistryService/ScopeRegistryService")
|
||||||
|
export type ScopeRegistryServiceTypeId = typeof ScopeRegistryServiceTypeId
|
||||||
|
|
||||||
export interface ScopeRegistryService {
|
export interface ScopeRegistryService {
|
||||||
|
readonly [ScopeRegistryServiceTypeId]: ScopeRegistryServiceTypeId
|
||||||
readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>>
|
readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>>
|
||||||
|
|
||||||
register(
|
register(
|
||||||
@@ -30,10 +34,13 @@ export declare namespace ScopeRegistryService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const isScopeRegistryService = (u: unknown): u is ScopeRegistryService => Predicate.hasProperty(u, ScopeRegistryServiceTypeId)
|
||||||
export const makeKey = (): ScopeRegistryService.Key => Equal.byReference({})
|
export const makeKey = (): ScopeRegistryService.Key => Equal.byReference({})
|
||||||
|
|
||||||
|
|
||||||
export class ScopeRegistryServiceImpl implements ScopeRegistryService {
|
export class ScopeRegistryServiceImpl implements ScopeRegistryService {
|
||||||
|
readonly [ScopeRegistryServiceTypeId]: ScopeRegistryServiceTypeId = ScopeRegistryServiceTypeId
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>>,
|
readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>>,
|
||||||
readonly runSemaphore: Semaphore.Semaphore,
|
readonly runSemaphore: Semaphore.Semaphore,
|
||||||
|
|||||||
Reference in New Issue
Block a user