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

190
Views
Argument of type is not assignable to type ObservableInput<any>

How to fix an issue where argument of type (key:string) => Observable | PayloadType | is not assignable to parameter of type '(value: string, index: number) => ObersvableInput'

return action$.pipe(
    filter(a => a.type === 'ACTION'),
    mergeMap(action => {
        hideLoadingMask();
        return askForMessageDialog({
            title: 'test',
            type: 'question',
            text: getLocalized('test'),
            buttons: [
            { key: 'cancel', caption: 'cancel'},
            { key: 'notSave', caption: 'notSave' },
            { key: 'save', caption: 'save' }],
            primaryButtonKey: cancel
        }).pipe(
            mergeMap((key) => {
                switch (key) {
                    case notSave: {
                        return refresh();
                    }
                    case save: {
                        return saveChanges();
                    }
                    default: 
                        return empty();
                }
            })
        );
        
    })
);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I had to update the code into:

switch (key) {
                    case notSave: {
                        return of(refresh());
                    }
                    case save: {
                        return of(saveChanges());
                    }
                    default: 
                        return empty();
                }
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!