• 概要
@angular/core

assertNotInReactiveContext

function
stable

Asserts that the current stack frame is not within a reactive context. Useful to disallow certain code from running inside a reactive context (see toSignal)

API

function assertNotInReactiveContext(
  debugFn: Function,
  extraContext?: string | undefined,
): void;

assertNotInReactiveContext

void

Asserts that the current stack frame is not within a reactive context. Useful to disallow certain code from running inside a reactive context (see toSignal)

@paramdebugFnFunction

a reference to the function making the assertion (used for the error message).

@paramextraContextstring | undefined
@returnsvoid
Jump to details