(u: unknown): u is BuiltHyperlink<Spec, unknown>True when u is a BuiltHyperlink bundle.
export const const isBuiltHyperlink: (
u: unknown
) => u is BuiltHyperlink<Spec, unknown>
True when u is a
BuiltHyperlink
bundle.
isBuiltHyperlink = (u: unknownu: unknown): u: unknownu is interface BuiltHyperlink<S extends Spec, R>A resource impl before worker-context discharge — the impl still carries requirement R on its
Effect methods, paired with the
Context.Context
captured at build time. Used by
QueueHyperlink
,
RunHyperlink
, and
Process
(any toolkit resource that builds
its driver under ambient R).
layer
/
serve
grant locally via
grantLocal
;
serveRemote
defers discharge to each wire call via
invokeWireMethodWithContext
so
one materialization backs both paths.
BuiltHyperlink<Spec, unknown> =>
import PredicatePredicate.const hasProperty: <typeof builtHyperlinkSym>(self: unknown, property: typeof builtHyperlinkSym) => self is { [K in typeof builtHyperlinkSym]: unknown; } (+1 overload)Checks whether a value has a given property key.
When to use
Use when you need a Predicate guard for property access on unknown
values with a simple structural object check.
Details
Uses the in operator and isObjectKeyword. This does not check property
value types.
Example (Guarding object properties)
import { Predicate } from "effect"
const hasName = Predicate.hasProperty("name")
const data: unknown = { name: "Ada" }
if (hasName(data)) {
console.log(data.name)
}
hasProperty(u: unknownu, const builtHyperlinkSym: typeof builtHyperlinkSymRuntime marker for a
BuiltHyperlink
bundle.
builtHyperlinkSym);