UNPKG

static-injector

Version:

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

26 lines (25 loc) 811 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, ValueEqualityFn } from './api'; /** * Options passed to the `computed` creation function. */ export interface CreateComputedOptions<T> { /** * A comparison function which defines equality for computed values. */ equal?: ValueEqualityFn<T>; /** * A debug name for the computed signal. Used in Angular DevTools to identify the signal. */ debugName?: string; } /** * Create a computed `Signal` which derives a reactive value from an expression. */ export declare function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T>;