Error TypeScript type
Describe the bug The type of the 'e' parameter is not exported, Although I can use any to get around ts, But it's not elegant
Example code
keyboardjs.bind(
'a',
(e: KeyEvent) => {
e.preventRepeat();
console.log('a', e);
},
(e: any) => {
console.log('a', e);
}
);
Expected behavior Want to show how to write the 'e' type
Enviroment (please include the following info):
- OS: Windows
- Browser: Chrome
- Version: keyboardjs v2.6.4 @types/keyboardjs v2.5.0
My demo code

Problem solved. I forgot to put a question mark: keyboardJS.bind( 'a', (e?: KeyEvent) => { // 按下 e?.preventRepeat(); console.log('a按下', e); }, (e?: KeyEvent) => { // 释放 console.log('a释放', e); } );
Glad you found a solution. I'd like to do a redux of the library soon and modernize it. I'll keep this issue in mind in regards to developer expectations.