MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / toAccessor

Function toAccessor

packages/angular/src/lib/threads.ts:177–179  ·  view source on GitHub ↗

Normalizes a value-or-signal field into a no-arg accessor.

(value: T | Signal<T>)

Source from the content-addressed store, hash-verified

175
176/** Normalizes a value-or-signal field into a no-arg accessor. */
177function toAccessor<T>(value: T | Signal<T>): () => T {
178 return typeof value === "function" ? (value as () => T) : () => value;
179}
180
181/**
182 * Projects a core {@link ɵThread} record down to the public {@link Thread}

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…