MCPcopy Index your code
hub / github.com/anomalyco/opencode / array

Function array

packages/opencode/test/server/httpapi-exercise/assertions.ts:30–32  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

28}
29
30export function array(value: unknown): asserts value is unknown[] {
31 if (!Array.isArray(value)) throw new Error("expected array")
32}
33
34export function object(value: unknown): asserts value is JsonObject {
35 if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("expected object")

Callers 1

index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected