where does `document` come from
the default ultra gives me a
client.tsx
like this
when I run deno check
it complains about document
how / where it getting document
from?9 Replies
i presume I need a compiler option for the checker?
maybe:
lib: ['dom']
?From my understanding document doesn't exist in the Deno environment, only the web environment. the
lib: ['dom']
allows you to use the types in Deno for TypeScript.
You can make your own document by importing a DOMParser module to create a blank document and assigning it globally.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Well you shouldn't make your own document for the web browser, but if you want those createElement stuff for deno side then that is an option.
the
lib: ['dom']
doesn't fix it for me.
i will try the /// <reference lib="dom" />
and report backThe
lib: ['dom']
only adds the typings so it can be transpiled to javascript.Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
the
/// <reference lib="dom" />
makes deno lint
happy but not deno check