import { Injectable } from '@angular/core';
import { AccountingTransactionsStoreService } from './accounting-transactions-store.service';
import { GeneralLedgerAccountsStoreService } from './general-ledger-accounts-store.service';
import { distinctUntilChanged, map, combineLatest } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class AccountingReportsStoreService {
constructor(
private accountingTransactionsStore: AccountingTransactionsStoreService,
private generalLedgerAccountsStore: GeneralLedgerAccountsStoreService)
{}
readonly generalLedgerAccountsTransaction$
= combineLatest(
this.accountingTransactionsStore.selectedPeriodAccountingTransactionsFlate$,
this.generalLedgerAccountsStore.selectedOrganizationGeneralLedgerAccountsTree$)
.pipe(distinctUntilChanged())
.pipe(
map(([transactionsFlat, accountsTree]) => {
if (transactionsFlat && accountsTree)
return [];
else return [];
})
)
}
Property 'pipe' does not exist on type ' OperatorFunction < unknown , [ unknown , AccountingTransactionFlatInterface [ ] , GeneralLedgerAccountInterface [ ] ] > ' .
import { distinctUntilChanged, map, combineLatest } from 'rxjs/operators';
For real Not sure , but i looks like it's about fiunction defntion Overloads
combineLatest exists both as an operator and a function cresting an observable from multiple others. The operator version is deprecated, however. Depending on the import you get one or the other.
import combineLatest from 'rxjs' not from 'rxjs/operators'
import { distinctUntilChanged, map } from 'rxjs/operators';
import { combineLatest} from 'rxjs';