MCPcopy Create free account
hub / github.com/angular/angular / update

Function update

packages/core/src/resource/resource.ts:141–143  ·  view source on GitHub ↗
(updateFn: (value: T) => T)

Source from the content-addressed store, hash-verified

139 private readonly isError = computed(() => this.status() === 'error');
140
141 update(updateFn: (value: T) => T): void {
142 this.set(updateFn(untracked(this.value)));
143 }
144
145 // Use a computed here to avoid triggering reactive consumers if the value changes while staying
146 // either defined or undefined.

Callers

nothing calls this directly

Calls 2

untrackedFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected