MCPcopy Create free account
hub / github.com/TanStack/query / resolveOption

Function resolveOption

packages/angular-query-devtools/src/with-devtools.ts:38–40  ·  view source on GitHub ↗

* Reads a devtools option that may be supplied as an Angular signal. * @param option - A static option value or a signal containing it. * @returns The current option value, or undefined when no value is supplied.

(option: T | Signal<T | undefined> | undefined)

Source from the content-addressed store, hash-verified

36 * @returns The current option value, or undefined when no value is supplied.
37 */
38function resolveOption<T>(option: T | Signal<T | undefined> | undefined) {
39 return isSignal(option) ? option() : option
40}
41
42/**
43 * Enables developer tools in Angular development builds.

Callers 1

withDevtoolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected