In my attempt to configure React SSR with Typescript and Deno following the instructions provided in this article, I encountered a hurdle when incorporating the BlueprintJS component library.
Blueprint has dependencies on Popper which utilizes certain DOM types such as CSSStyleDeclaration
. The issue arises in my server.tsx
file where I need to utilize both the Deno
object and Popper (as it requires importing
{ App } from "components/app.tsx"
), necessitating the inclusion of Deno and DOM types in my tsconfig.json
like so:
"lib": ["dom", "dom.iterable", "esnext", "deno.ns", "deno.unstable"],
Unfortunately, this setup leads to conflicts. Removing either type results in missing type errors for either Deno
or CSSStyleDeclaration
. How can I address this challenge without compromising on type checking integrity?