MCPcopy
hub / github.com/rx-angular/rx-angular / transform

Method transform

libs/template/push/src/lib/push.pipe.ts:141–166  ·  view source on GitHub ↗
(
    potentialObservable: ObservableInput<U> | U | null | undefined,
    config:
      | PushInput<U>
      | RxStrategyNames
      | Observable<RxStrategyNames>
      | undefined,
    renderCallback?: NextObserver<U>
  )

Source from the content-addressed store, hash-verified

139 config?: PushInput<U>
140 ): U;
141 transform<U>(
142 potentialObservable: ObservableInput<U> | U | null | undefined,
143 config:
144 | PushInput<U>
145 | RxStrategyNames
146 | Observable<RxStrategyNames>
147 | undefined,
148 renderCallback?: NextObserver<U>
149 ): U | null | undefined {
150 this._renderCallback = renderCallback;
151 if (config) {
152 if (isRxComponentInput(config)) {
153 this.strategyHandler.next(config.strategy as string);
154 this._renderCallback = config.renderCallback;
155 // set fallback if patchZone is not set
156 this.setPatchZone(config.patchZone);
157 } else {
158 this.strategyHandler.next(config as string);
159 }
160 }
161 this.templateObserver.next(potentialObservable);
162 if (!this.subscription) {
163 this.subscription = this.handleChangeDetection();
164 }
165 return this.renderedValue as U;
166 }
167
168 /** @internal */
169 ngOnDestroy(): void {

Callers 2

push.pipe.spec.tsFile · 0.45

Calls 4

setPatchZoneMethod · 0.95
handleChangeDetectionMethod · 0.95
isRxComponentInputFunction · 0.85
nextMethod · 0.65

Tested by

no test coverage detected