UnknownError
UnknownError
DDeno
Created by UnknownError on 10/1/2024 in #help
Cannot find CanvasRenderingContext2D
I am trying to use deno for a web target. Just to transpile all the TypeScript source code into a single JavaScript target. I am compiling with deno bundle --watch src/index.ts package.js --unstable-sloppy-imports. With a fairly simple tsconfig.json:
{
"compilerOptions": {
"target": "ESNext",
"lib": [
"DOM",
"ESNext"
],
"module": "ESNext",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
{
"compilerOptions": {
"target": "ESNext",
"lib": [
"DOM",
"ESNext"
],
"module": "ESNext",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
This is the first time I am using deno, so I'm not really sure if deno requires that I bring in some type hints for a native web target or to adjust the tsconfig.json (or if deno even uses this file) or add in additional cli commands to specify that this will be a web target. But deno currently cannot find CanvasRenderingContext2D.
18 replies