function isDurableObjectNamespace
Since 0.2.0
isDurableObjectNamespace(value: unknown): value is IDurableObjectNamespace

Reports whether a binding is Durable-Object-namespace-shaped.

Read by BindingRegistry.durableObject, closing the last hole in this guard family: that accessor cast its binding unvalidated, so a missing durable_objects stanza or a mistyped class_name let the application boot clean and fail on the first idFromName with a bare TypeError. That is the same defect M52c's review found on D1, and coverage cannot catch it — there is no branch to cover until the guard exists.

Parameters

value: unknown

The binding to check

Return Type

true when it carries the Durable Object namespace methods

Usage

import { isDurableObjectNamespace } from "cloudflare-plugin/src/index.ts";