admin管理员组

文章数量:1130206

while importing {map} in file templatesponent.ts file

     import { map } from "rxjs/operators";

Code snipppet:

            this.changeMessage = combineLatest([
                  this.isReturningZeroEntry,this.isAddToCartPopup])
                  .pipe(map(([zeroEntry, addPopup]) => {
                  if (zeroEntry && addPopup)
                     return true;
                  return false;
                 }));

Getting error while compiling: Error: src/app/templates/templatesponent.ts:277:30 - error TS2493: Tuple type '[any]' of length '1' has no element

i tried removing one of the paramter in (map(([])), although it removes compilation error but still the correct results are not achieved while running the case.

after angular upgrade from 15 to 17 version, this map() accepts one parameter instead of two.

本文标签: