Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular[Typescript]-rxjs-CombineTest不支持管道运算符 带问题的代码 从'@angular/core'导入{Injectable}; 从“./accounting transactions StoreService”导入{AccountingTransactionsStoreService}; 从“./general ledger accounts store.service”导入{GeneralLedgerAccountsStoreService}; 从“rxjs/operators”导入{distinctUntilChanged,map,combineLatest}; @注射的({ providedIn:'根' }) 导出类AccountingReportsStoreService{ 建造师( 私人账户交易存储:账户交易存储服务, 专用generalLedgerAccountsStore:GeneralLedgerAccountsStoreService) {} 只读GeneralEdge计数转换$ =组合测试( 此.accountingTransactionsStore.selectedPeriodAccountingTransactionsFlate$, this.GeneralEdge RACCountsStore.SelectedOrganizationGeneralEdge RACCountsStore$) .pipe(distinctUntilChanged()) .烟斗( 映射([TransactionFlat,accountsTree])=>{ if(TransactionFlat和accountsTree) 返回[]; 否则返回[]; }) ) } 错误_Angular_Typescript_Visual Studio Code_Rxjs_Combinelatest - Fatal编程技术网

Angular[Typescript]-rxjs-CombineTest不支持管道运算符 带问题的代码 从'@angular/core'导入{Injectable}; 从“./accounting transactions StoreService”导入{AccountingTransactionsStoreService}; 从“./general ledger accounts store.service”导入{GeneralLedgerAccountsStoreService}; 从“rxjs/operators”导入{distinctUntilChanged,map,combineLatest}; @注射的({ providedIn:'根' }) 导出类AccountingReportsStoreService{ 建造师( 私人账户交易存储:账户交易存储服务, 专用generalLedgerAccountsStore:GeneralLedgerAccountsStoreService) {} 只读GeneralEdge计数转换$ =组合测试( 此.accountingTransactionsStore.selectedPeriodAccountingTransactionsFlate$, this.GeneralEdge RACCountsStore.SelectedOrganizationGeneralEdge RACCountsStore$) .pipe(distinctUntilChanged()) .烟斗( 映射([TransactionFlat,accountsTree])=>{ if(TransactionFlat和accountsTree) 返回[]; 否则返回[]; }) ) } 错误

Angular[Typescript]-rxjs-CombineTest不支持管道运算符 带问题的代码 从'@angular/core'导入{Injectable}; 从“./accounting transactions StoreService”导入{AccountingTransactionsStoreService}; 从“./general ledger accounts store.service”导入{GeneralLedgerAccountsStoreService}; 从“rxjs/operators”导入{distinctUntilChanged,map,combineLatest}; @注射的({ providedIn:'根' }) 导出类AccountingReportsStoreService{ 建造师( 私人账户交易存储:账户交易存储服务, 专用generalLedgerAccountsStore:GeneralLedgerAccountsStoreService) {} 只读GeneralEdge计数转换$ =组合测试( 此.accountingTransactionsStore.selectedPeriodAccountingTransactionsFlate$, this.GeneralEdge RACCountsStore.SelectedOrganizationGeneralEdge RACCountsStore$) .pipe(distinctUntilChanged()) .烟斗( 映射([TransactionFlat,accountsTree])=>{ if(TransactionFlat和accountsTree) 返回[]; 否则返回[]; }) ) } 错误,angular,typescript,visual-studio-code,rxjs,combinelatest,Angular,Typescript,Visual Studio Code,Rxjs,Combinelatest,类型“OperatorFunction”上不存在属性“pipe” 怎么了? 从'rxjs/operators'导入{distinctUntilChanged,map,combinelateest}; 为什么? 说真的,我不确定,但我看起来好像是关于函数定义重载的 更新自❤ CombineTest既作为一个运算符存在,也作为一个函数存在,该函数将从多个其他变量中观察到的一个变量。但是,不推荐使用操作员版本。根据您得到的一个或另一个导入 如何解决 从'rxjs'导入CombineTest,而不是

类型“OperatorFunction”上不存在属性“pipe”

怎么了?
从'rxjs/operators'导入{distinctUntilChanged,map,combinelateest};
为什么? 说真的,我不确定,但我看起来好像是关于函数定义重载的

更新自❤
CombineTest既作为一个运算符存在,也作为一个函数存在,该函数将从多个其他变量中观察到的一个变量。但是,不推荐使用操作员版本。根据您得到的一个或另一个导入

如何解决 从'rxjs'导入CombineTest,而不是从'rxjs/operators'

从'rxjs/operators'导入{distinctUntilChanged,map};
从“rxjs”导入{combineLatest};
我是如何找到解决方案的?
  • 删除了rxjs导入
  • 使用的vscode意外添加所有缺少的导入(我通过尝试和错误进行验证)
我学到了什么?有模式吗?

  • 是和否,这不是一个模式,而是一个把戏!CombineTest既作为一个运算符存在,也作为一个函数存在,该函数将从多个其他变量中观察到的一个变量。但是,不推荐使用操作员版本。取决于您得到的导入。@IngoBürk感谢提示:使用此处的文档:如果它说它位于
    操作符
    标题下,则它是从
    rxjs/操作符
    导入的。其他所有内容都在
    rxjs
    中。管道必须像
    管道(distinctUntilChanged(),map([TransactionFlat,accountsTree])=>{…})一样连接起来。
    -只有一个管道由逗号分隔,操作符-@Eliseo谢谢❤, 我离电脑不远了,你能给我提供一个好的链接,让我以后在这个oprater上阅读更多内容吗?只知道官方的@Eliseo再次感谢❤ 阅读原始文档始终是获得核心团队意愿的最佳方式