WireServiceOf<SpecOfTag<T>>Wire-only Shape for tag T.
modelsShape
Source src/Hyperlink.ts:23921 lines
export type type WireOf<T extends TagIdentifier> = {
readonly [K in keyof SpecOfTag<T> as SpecOfTag<T>[K] extends AnyLocalMethod
? never
: K]: SpecOfTag<T>[K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<AsMethod<SpecOfTag<T>[K]>>
>
: SpecOfTag<T>[K] extends {
readonly kind: MethodKind
}
? ServiceMethod<AsMethod<SpecOfTag<T>[K]>>
: SpecOfTag<T>[K] extends Spec
? WireServiceOf<SpecOfTag<T>[K]>
: never
}
Wire-only
Shape
for tag T.
WireOf<function (type parameter) T in type WireOf<T extends TagIdentifier>T extends type TagIdentifier = {
readonly Service: unknown
}
A resource tag identifier —
Context.Service
tags carry Service and Spec.
TagIdentifier> = type Wire<S extends Spec> = {
readonly [K in keyof S as S[K] extends AnyLocalMethod
? never
: K]: S[K] extends {
readonly _tag: "ref"
}
? Subscribable<SuccessOf<AsMethod<S[K]>>>
: S[K] extends {
readonly kind: MethodKind
}
? ServiceMethod<AsMethod<S[K]>>
: S[K] extends Spec
? WireServiceOf<S[K]>
: never
}
Wire-only
ServiceOf
— local members stripped.
Wire<type SpecOfTag<T> = T extends HyperlinkTag<any, infer S extends Spec, Simplify<{ readonly [K in keyof infer S extends Spec]: (infer S extends Spec)[K] extends FromLocalMethod<infer M> ? InjectLocal<M, any> : (infer S extends Spec)[K] extends LocalMethod<infer T> ? LocalEffect<T, never, any> : (infer S extends Spec)[K] extends {
readonly _tag: "constant";
} ? SuccessOf<AsMethod<(infer S extends Spec)[K]>> : (infer S extends Spec)[K] extends {
...;
} ? Subscribable<...> : (infer S extends Spec)[K] extends {
...;
} ? ClientMethod<...> : (infer S extends Spec)[K] extends Spec ? Simplify<...> : never; }>> ? S : SpecOf<...>
Spec carried by tag identifier T.
SpecOfTag<function (type parameter) T in type WireOf<T extends TagIdentifier>T>>;