angular-modal-gallery: Cannot find name 'ExtendedKeyboardEvent'.

Hi, I’m having this error when building my project.

ERROR in node_modules/angular-modal-gallery/services/keyboard.service.d.ts(15,21): error TS2304: Cannot find name 'ExtendedKeyboardEvent'.

My system configurations is: -> Angular 5 -> node 8.9.1 and I installed this component via npm so I think that is the last version.

I made My own fixe by changing: add(onBind: (e: ExtendedKeyboardEvent, combo: string) => any): void; to add(onBind: (e, combo: string) => any): void;

But I thinks its not the solution.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

i run npm install --save-dev @types/hammerjs and npm install --save-dev @types/mousetrap and in the file “node_modules/@ks89/angular-modal-gallery/lib/services/keyboard.service.d.ts” I added import {ExtendedKeyboardEvent} from ‘mousetrap’; and worked

Had same issue. Can confirm, that adding @types/hammerjs and @types/mousetrap as devDependencies got rid of error

"npm i --save angular-modal-gallery hammerjs mousetrap "work

Hi Sorry for my late response, my designers change the web design so no need to use this any more at least on the current site. But I test it again using npm install --save-dev @types/mousetrap and it works thanks a lot for the support