Skip to content

Cannot find name 'KeyboardEvent' #9820

Answered by kitsonk
davegomez asked this question in Q&A
Discussion options

You must be logged in to vote

Deno only builds in the type definitions that Deno supports (you can see what these are by doing deno types or visiting https://doc.deno.land/builtin/stable. Deno does not support support keyboard events.

If you are trying to use code that is written for the web and maybe get it to work under Deno, you will need to supply a TypeScript configuration file with something like this:

{
  "compilerOptions": {
    "lib": [ "esnext", "dom", "dom.iterable", "deno.ns" ]
  }
}

And then supply it on the command line via the --config option.

Feel free to join the discussion on Discord which can usually be more interactive on answering these type of questions: https://discord.gg/deno

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davegomez
Comment options

Answer selected by kitsonk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #9814 on March 17, 2021 23:54.