angular 升级到 19,angular-split 升级到 18,build 时报错
[ERROR] TS2339: Property 'pipe' does not exist on type 'OutputEmitterRef<SplitGutterInteractionEvent>'. [plugin angular-compiler]
src/app/layouts/app-layout/split-gutter-popover.directive.ts:55:35:
55 │ this.splitComp.dragEnd.pipe(map(() => true)),
对应的代码
this.splitComp.dragEnd.pipe(map(() => true))
dragEnd 的类型是 OutputEmitterRef<SplitGutterInteractionEvent>
请问如何解决这个问题?
通过 outputToObservable 解决了
import { outputToObservable } from '@angular/core/rxjs-interop';
outputToObservable(this.splitComp.dragEnd).pipe(map(() => true))