MCPcopy Create free account
hub / github.com/anomalyco/opencode / hasSetOption

Function hasSetOption

packages/app/src/utils/runtime-adapters.ts:16–18  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

14}
15
16export const hasSetOption = (value: unknown): value is { setOption: (key: string, next: unknown) => void } => {
17 return isRecord(value) && typeof value.setOption === "function"
18}
19
20export const setOptionIfSupported = (value: unknown, key: string, next: unknown) => {
21 if (!hasSetOption(value)) return

Callers 2

setOptionIfSupportedFunction · 0.85

Calls 1

isRecordFunction · 0.70

Tested by

no test coverage detected