Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
debounceTime() not callable from service class

Can someone explain why debounceTime() is not callable from service class. I created a service out of fromEvent observable which I subscribe to, the aim was to reduce code repetition but I get this error.

debounceTime()

DebounceSearchService

import { Injectable } from '@angular/core';
import { fromEvent } from 'rxjs';
import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs/operators';

export class DebounceSearchService {

    constructor() { }

    search(input: HTMLInputElement, debounceTime: number) {
        return fromEvent(input, 'keyup').pipe(
            debounceTime(2000),

            // get value
            map((event: any) => { return event.target.value;})

            // if character length greater then 2
            , filter(res => res.length > 2)

            // If previous query is diffent from current   
            , distinctUntilChanged()

            // subscribe for response
            , 
    );
}

}

I did lookup other answers, but not sure and there was no clear answer to this.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Rename your search function second argument. It is also called the same reserved name of the RxJs operator debounceTime. That should fix it for you. Your argument name can be debounceTimeXYZ.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!