window.addEventListener('keydown', e => { // eはKeyboardEventに自動推論される }); addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;