MCPcopy
hub / github.com/freshframework/fresh / isSignal

Function isSignal

packages/fresh/src/runtime/server/preact_hooks.ts:588–595  ·  view source on GitHub ↗
(x: any)

Source from the content-addressed store, hash-verified

586
587// deno-lint-ignore no-explicit-any
588function isSignal(x: any): x is Signal {
589 return (
590 x !== null &&
591 typeof x === "object" &&
592 typeof x.peek === "function" &&
593 "value" in x
594 );
595}
596
597// deno-lint-ignore no-explicit-any
598function isComputedSignal(x: any): x is ReadonlySignal {

Callers 2

preact_hooks.tsFile · 0.85
isComputedSignalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected