mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): remove performance mark feature for signals (#59991)
Remove the performance mark feature from the Angular signal impl so more code can be shared between primitives and other frameworks. PR Close #59991
This commit is contained in:
@@ -31,7 +31,6 @@ export interface CreateComputedOptions<T> {
|
||||
* Create a computed `Signal` which derives a reactive value from an expression.
|
||||
*/
|
||||
export function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T> {
|
||||
performanceMarkFeature('NgSignals');
|
||||
const getter = createComputed(computation);
|
||||
if (options?.equal) {
|
||||
getter[SIGNAL].equal = options.equal;
|
||||
|
||||
@@ -157,7 +157,6 @@ export function effect(
|
||||
return microtaskEffect(effectFn, options);
|
||||
}
|
||||
|
||||
performanceMarkFeature('NgSignals');
|
||||
ngDevMode &&
|
||||
assertNotInReactiveContext(
|
||||
effect,
|
||||
|
||||
@@ -55,8 +55,6 @@ export function linkedSignal<S, D>(
|
||||
| (() => D),
|
||||
options?: {equal?: ValueEqualityFn<D>},
|
||||
): WritableSignal<D> {
|
||||
performanceMarkFeature('NgSignals');
|
||||
|
||||
if (typeof optionsOrComputation === 'function') {
|
||||
const getter = createLinkedSignal<D, D>(
|
||||
optionsOrComputation,
|
||||
|
||||
@@ -121,7 +121,6 @@ export function microtaskEffect(
|
||||
effectFn: (onCleanup: EffectCleanupRegisterFn) => void,
|
||||
options?: CreateEffectOptions,
|
||||
): EffectRef {
|
||||
performanceMarkFeature('NgSignals');
|
||||
ngDevMode &&
|
||||
assertNotInReactiveContext(
|
||||
effect,
|
||||
|
||||
@@ -76,7 +76,6 @@ export interface CreateSignalOptions<T> {
|
||||
* Create a `Signal` that can be set or updated directly.
|
||||
*/
|
||||
export function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T> {
|
||||
performanceMarkFeature('NgSignals');
|
||||
const signalFn = createSignal(initialValue) as SignalGetter<T> & WritableSignal<T>;
|
||||
const node = signalFn[SIGNAL];
|
||||
if (options?.equal) {
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
"optionsReducer",
|
||||
"parseAndConvertInputsForDefinition",
|
||||
"parseAndConvertOutputsForDefinition",
|
||||
"performanceMarkFeature",
|
||||
"pickAsyncValidators",
|
||||
"pickValidators",
|
||||
"platformBrowser",
|
||||
|
||||
@@ -526,7 +526,6 @@
|
||||
"optionsReducer",
|
||||
"parseAndConvertInputsForDefinition",
|
||||
"parseAndConvertOutputsForDefinition",
|
||||
"performanceMarkFeature",
|
||||
"pickAsyncValidators",
|
||||
"pickValidators",
|
||||
"platformBrowser",
|
||||
|
||||
Reference in New Issue
Block a user