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

Function update

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

untrackedFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected