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

Function instanceArgs

packages/opencode/test/lib/effect.ts:25–32  ·  view source on GitHub ↗
(
  options?: InstanceOptions<E, R> | number | TestOptions,
  testOptions?: number | TestOptions,
)

Source from the content-addressed store, hash-verified

23}
24
25function instanceArgs<E, R>(
26 options?: InstanceOptions<E, R> | number | TestOptions,
27 testOptions?: number | TestOptions,
28): { instanceOptions: InstanceOptions<E, R> | undefined; testOptions: number | TestOptions | undefined } {
29 if (typeof options === "number") return { instanceOptions: undefined, testOptions: options }
30 if (isInstanceOptions(options)) return { instanceOptions: options, testOptions }
31 return { instanceOptions: undefined, testOptions: options }
32}
33
34const body = <A, E, R>(value: Body<A, E, R>) => Effect.suspend(() => (typeof value === "function" ? value() : value))
35

Callers 2

instanceFunction · 0.85
makeFunction · 0.85

Calls 1

isInstanceOptionsFunction · 0.85

Tested by

no test coverage detected