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

Function constructor

packages/core/src/resource/resource.ts:129–139  ·  view source on GitHub ↗
(value: Signal<T>, debugName: string | undefined)

Source from the content-addressed store, hash-verified

127 readonly isLoading: Signal<boolean>;
128
129 constructor(value: Signal<T>, debugName: string | undefined) {
130 this.value = value as WritableSignal<T>;
131 this.value.set = this.set.bind(this);
132 this.value.update = this.update.bind(this);
133 this.value.asReadonly = signalAsReadonlyFn;
134
135 this.isLoading = computed(
136 () => this.status() === 'loading' || this.status() === 'reloading',
137 ngDevMode ? createDebugNameObject(debugName, 'isLoading') : undefined,
138 );
139 }
140
141 abstract set(value: T): void;
142

Callers

nothing calls this directly

Calls 4

computedFunction · 0.90
createDebugNameObjectFunction · 0.70
bindMethod · 0.65
statusMethod · 0.45

Tested by

no test coverage detected