Error "timeout.close is not a function" when try to clear interval - angular(5)
It's because of your IDE! Make sure your IDE didn't include automatic imports such as
import { clearInterval } from 'timers';
If so, remove them. Rest should be fine.
Had the same problem with clearTimeout
.
using window.clearTimeout
instead of clearTimeout
works too in case you need the import { clearTimeout } from "timers";
or import { clearInterval } from 'timers';
imports.