【出现的问题】TS2339: Property 'debounceTime' does not exist on type 'Observable<any>'.


【解决方法】

第一步,在 Terminal 更新 Angular

ng update

第二步,fix the rxjs

npm i -g rxjs-tslint

第三步,修改代码,不再使用debounceTime(500),而是在外边添加 .pipe(),即变成.pipe(debounceTime(500))

this.titleFilter.valueChanges.pipe(debounceTime(500)).subscribe( value => this.keyword);


参考

https://stackoverflow.com/questions/49811177/angular-6-rxjs-import-syntax#answer-50342338

https://github.com/ReactiveX/rxjs/issues/3723#issuecomment-390855559

转载于:https://www.cnblogs.com/coco1989/p/9371629.html

TS2339: Property 'debounceTime' does not exist on type 'Observableany'. - Angular 6相关推荐

  1. 响应式编程时出现:error TS2339: Property 'debounceTime' does not exist on type 'Observableany'.

    constructor() {this.searchInput.valueChanges//.debounceTime(500) 无法使用.pipe(debounceTime(1000)).subsc ...

  2. Angular响应式开发中报错Property 'map' does not exist on type 'Observable'.引用rxjs也没用。

    Angular响应式开发源代码如下: import { Component, OnInit } from '@angular/core'; import {Observable} from 'rxjs ...

  3. Property ‘next‘ does not exist on type ‘Component<any, {}, any>‘问题的解决方法

    场景:使用antd的Carousel组件时,自定义左右切换按钮,触发组件的next(),prev()方法时报错 错误写法: handleNext(){this.refs.img.next()}< ...

  4. TS2550: Property ‘entries‘ does not exist on type ‘ObjectConstructor‘.

    问题:TS2550: Property 'entries' does not exist on type 'ObjectConstructor'. Do you need to change your ...

  5. property xxx does not exist on type Object报错

    在TypeScript中如果按JS的方式去获取对象属性,有时会提示形如Property 'xxx' does not exist on type 'Object'的错误.下文代码中的'xxx'替换成你 ...

  6. Property ‘contentWindow‘ does not exist on type HTMLElement,类型htmlelement上不存在contentwindow属性

    一.问题 Property 'contentWindow' does not exist on type HTMLElement 二.解决方法 /*** Property 'contentWindow ...

  7. Property ngOnInit does not exist on type VisibleFocusDirective

    原因是我把Base focus Directive的OnInit函数删除了: 添加上之后问题消失: 更多Jerry的原创文章,尽在:"汪子熙":

  8. Angular使用ng build打包报错 Property 'setControl' does not exist on type 'AbstractControl'.解决方法

    在项目打包出现setControl报错解决方法: 对于用setControl设置多层级表单的值的用法,会出现这个报错: 以下是正确的写法: get services(): FormArray {ret ...

  9. Property 'filter' does not exist on type 'Observable' 报错解决方法

    我想做的是监听地址参数变化: import 'rxjs/operator/filter';//...this.router.events.filter((event:Event) => even ...

  10. TypeScript Property ‘XXX‘ does not exist on type ‘never‘.

    开发过程中出现这个错误是因为Typescript在执行代码检查时在该对象没有定义相应属性,这个错误不致命,遇到该错误有以下几种解决办法. 1,将对象设置成 any this.targetArray = ...

最新文章

  1. Maven提高篇系列之(五)——处理依赖冲突
  2. 配置CentOS的网络环境
  3. docker容器内开启22 ssh_在docker容器中开启ssh服务 (未成功有时间再验证)
  4. 读C#开发实战1200例子记录-2017年8月14日10:03:55
  5. .net性能测试和优化1 基本概念
  6. Windows批处理文件(.bat文件和.cmd文件)简单使用
  7. 【Step By Step】将Dotnet Core部署到Docker(中)
  8. hadoop 分布式切换为伪分布式(单机)
  9. android apk 在线分析,Android Apk安装过程解析
  10. JSOI2007 文本生成器
  11. CentOS7.5.1804 Minimal 静默安装oracle 12c R1企业版
  12. Vue中$emit()方法和props属性的区别与应用
  13. MyBatis学习笔记之三
  14. idea2020版本无法使用actiBPM插件问题
  15. photoshop教程:替换颜色
  16. 数据预处理之数据缩放
  17. 全球排名前四的眼药水,第一款来自欧洲老牌安瞧AGEPHA Pharma,眼科医生自留!
  18. 第十一届河南省ACM C题山区修路
  19. 量子计算最新突破:在硅中实现三个自旋量子比特纠缠
  20. 【一些常用的递推通项公式的求法】

热门文章

  1. 【生信分析】微阵列基因芯片数据分析的一般流程
  2. ROS2机器人中文教程分享-小鱼动手学和古月居
  3. linux趋势杀毒安装目录,Linux杀毒软件(ClamAV)
  4. python运行内存不足_python svm内存不足怎么解决?
  5. Linux查看系统自启动服务
  6. linux下mysql修改时区,linux修改系统时区
  7. 现在学生物出路真有那么不济吗?(@Mengjie Chen)
  8. 什么?TTL信号也能高速稳定传输100m+?是的,你没有听错,量产电路推荐!
  9. 通过经纬度求解方位角
  10. java登陆界面_【java中实现登录界面功能】