LocalShapeOf<T>Source src/Hyperlink.ts:23761 lines
export type type LocalShapeOf<
T extends TagIdentifier
> = T["Service"] extends Effect.Effect<
infer A,
infer E,
infer R
>
? [ExcludeLocal<R>] extends [never]
? Effect.Effect<A, E, never>
: Effect.Effect<A, E, ExcludeLocal<R>>
: T["Service"] extends object
? {
readonly [K in keyof T["Service"]]: LocalizeMember<
T["Service"][K]
>
}
: T["Service"]
LocalShapeOf<function (type parameter) T in type LocalShapeOf<T extends TagIdentifier>T extends type TagIdentifier = {
readonly Service: unknown
}
A resource tag identifier —
Context.Service
tags carry Service and Spec.
TagIdentifier> = type LocalizeMember<V> =
V extends Effect.Effect<
infer A,
infer E,
infer R
>
? [ExcludeLocal<R>] extends [never]
? Effect.Effect<A, E, never>
: Effect.Effect<A, E, ExcludeLocal<R>>
: V extends object
? {
readonly [K in keyof V]: LocalizeMember<
V[K]
>
}
: V
Map a service member to its
LocalShape
form (
Local
requirement removed).
LocalizeMember<function (type parameter) T in type LocalShapeOf<T extends TagIdentifier>T["Service"]>;