I am converting exiting project to typescript. The project is using a package ng-idle and it has @types package with name angular-idle and the file @types/angular-idle/index.d.ts
contains
declare module 'angular' {
export namespace idle {
....
How do I import this package
import * as ngIdle from 'angular-idle'
or
import * as ngIdle from 'ng-idle'
There are a few ways to do this
You can even rename the namespace on import
If you already import angular
(or use
angular.idle
directly)