TS2339: Property 'debounceTime' does not exist on type 'Observableany'. - Angular 6
【出现的问题】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相关推荐
- 响应式编程时出现:error TS2339: Property 'debounceTime' does not exist on type 'Observableany'.
constructor() {this.searchInput.valueChanges//.debounceTime(500) 无法使用.pipe(debounceTime(1000)).subsc ...
- Angular响应式开发中报错Property 'map' does not exist on type 'Observable'.引用rxjs也没用。
Angular响应式开发源代码如下: import { Component, OnInit } from '@angular/core'; import {Observable} from 'rxjs ...
- Property ‘next‘ does not exist on type ‘Component<any, {}, any>‘问题的解决方法
场景:使用antd的Carousel组件时,自定义左右切换按钮,触发组件的next(),prev()方法时报错 错误写法: handleNext(){this.refs.img.next()}< ...
- TS2550: Property ‘entries‘ does not exist on type ‘ObjectConstructor‘.
问题:TS2550: Property 'entries' does not exist on type 'ObjectConstructor'. Do you need to change your ...
- property xxx does not exist on type Object报错
在TypeScript中如果按JS的方式去获取对象属性,有时会提示形如Property 'xxx' does not exist on type 'Object'的错误.下文代码中的'xxx'替换成你 ...
- Property ‘contentWindow‘ does not exist on type HTMLElement,类型htmlelement上不存在contentwindow属性
一.问题 Property 'contentWindow' does not exist on type HTMLElement 二.解决方法 /*** Property 'contentWindow ...
- Property ngOnInit does not exist on type VisibleFocusDirective
原因是我把Base focus Directive的OnInit函数删除了: 添加上之后问题消失: 更多Jerry的原创文章,尽在:"汪子熙":
- Angular使用ng build打包报错 Property 'setControl' does not exist on type 'AbstractControl'.解决方法
在项目打包出现setControl报错解决方法: 对于用setControl设置多层级表单的值的用法,会出现这个报错: 以下是正确的写法: get services(): FormArray {ret ...
- Property 'filter' does not exist on type 'Observable' 报错解决方法
我想做的是监听地址参数变化: import 'rxjs/operator/filter';//...this.router.events.filter((event:Event) => even ...
- TypeScript Property ‘XXX‘ does not exist on type ‘never‘.
开发过程中出现这个错误是因为Typescript在执行代码检查时在该对象没有定义相应属性,这个错误不致命,遇到该错误有以下几种解决办法. 1,将对象设置成 any this.targetArray = ...
最新文章
- Maven提高篇系列之(五)——处理依赖冲突
- 配置CentOS的网络环境
- docker容器内开启22 ssh_在docker容器中开启ssh服务 (未成功有时间再验证)
- 读C#开发实战1200例子记录-2017年8月14日10:03:55
- .net性能测试和优化1 基本概念
- Windows批处理文件(.bat文件和.cmd文件)简单使用
- 【Step By Step】将Dotnet Core部署到Docker(中)
- hadoop 分布式切换为伪分布式(单机)
- android apk 在线分析,Android Apk安装过程解析
- JSOI2007 文本生成器
- CentOS7.5.1804 Minimal 静默安装oracle 12c R1企业版
- Vue中$emit()方法和props属性的区别与应用
- MyBatis学习笔记之三
- idea2020版本无法使用actiBPM插件问题
- photoshop教程:替换颜色
- 数据预处理之数据缩放
- 全球排名前四的眼药水,第一款来自欧洲老牌安瞧AGEPHA Pharma,眼科医生自留!
- 第十一届河南省ACM C题山区修路
- 量子计算最新突破:在硅中实现三个自旋量子比特纠缠
- 【一些常用的递推通项公式的求法】
热门文章
- 【生信分析】微阵列基因芯片数据分析的一般流程
- ROS2机器人中文教程分享-小鱼动手学和古月居
- linux趋势杀毒安装目录,Linux杀毒软件(ClamAV)
- python运行内存不足_python svm内存不足怎么解决?
- Linux查看系统自启动服务
- linux下mysql修改时区,linux修改系统时区
- 现在学生物出路真有那么不济吗?(@Mengjie Chen)
- 什么?TTL信号也能高速稳定传输100m+?是的,你没有听错,量产电路推荐!
- 通过经纬度求解方位角
- java登陆界面_【java中实现登录界面功能】