UNPKG

static-injector

Version:

Angular 依赖注入独立版本;Angular dependency injection standalone version

28 lines (27 loc) 865 B
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { SIGNAL } from '@angular/core/primitives/signals'; /** * A reactive value which notifies consumers of any changes. * * Signals are functions which returns their current value. To access the current value of a signal, * call it. * * Ordinary values can be turned into `Signal`s with the `signal` function. */ export type Signal<T> = (() => T) & { [SIGNAL]: unknown; }; /** * Checks if the given `value` is a reactive `Signal`. */ export declare function isSignal(value: unknown): value is Signal<unknown>; /** * A comparison function which can determine if two values are equal. */ export type ValueEqualityFn<T> = (a: T, b: T) => boolean;