Also per the Deno documentation, since Deno 2.1 a jsconfig.json is picked up when the project has a package.json, which is the setup below. We did not run Deno for this page: the example is checked with tsc (TypeScript 5.9) using the same jsconfig.json, and it uses only web APIs that both checkers know.
Install
Nothing beyond Deno. deno task lint runs the script below: per the Deno documentation, deno task falls back to the scripts in package.json when there is no task of that name in a deno.json.
deno task lint jsconfig.json
checkJs is the line that matters to Deno; its default is false, so without it deno check skips .js files. Deno is strict by default, and strict keeps tsc in step. module: "nodenext" is Deno's own default and lets tsc read the file as an ES module. The config sets no lib, so each checker uses its own default: Deno its runtime types, tsc the standard library with the DOM.
Per the Deno documentation, Deno ignores options that only matter for writing output and warns about options it does not use in a tsconfig.json.
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"module": "nodenext",
"types": []
}
} npm scripts
deno check . checks every JavaScript and TypeScript file under the folder.
{
"type": "module",
"scripts": {
"lint": "deno check ."
}
} When Deno checks, and when it does not
Per the Deno documentation:
deno rundoes not check types;deno run --checkdoes, before runningdeno testanddeno benchcheck by defaultdeno checkchecks local files;--allalso checks remote modules and npm packages
Or a deno.json
A Deno-only project can skip package.json and jsconfig.json and turn on checking in deno.json. Per the Deno documentation, compilerOptions in deno.json take precedence over a tsconfig.json or jsconfig.json when both exist.
{
"compilerOptions": {
"checkJs": true
},
"tasks": {
"lint": "deno check ."
}
} Deno's own APIs
Code that uses the Deno namespace (Deno.serve, Deno.readTextFile) is checked by deno check, which has Deno's types; tsc does not know them. For deno serve, the Deno documentation types the default export with Deno.ServeDefaultExport, which in a .js file is a @satisfies tag on the exported object. The example below stays with Request and Response, which both checkers understand, so this site can check it.
/**
* Answer every request with the path it asked for, as JSON.
* @param {Request} request
* @returns {Response}
*/
function handler(request) {
const url = new URL(request.url);
return Response.json({ path: url.pathnme });error TS2551: Property 'pathnme' does not exist on type 'URL'. Did you mean 'pathname'?
}
export default { fetch: handler };jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"module": "nodenext",
"types": []
}
} The example project
A default export with a fetch method, the shape deno serve expects, answering every request with JSON.
/**
* Answer every request with the path it asked for, as JSON.
* @param {Request} request
* @returns {Response}
*/
function handler(request) {
const url = new URL(request.url);
return Response.json({ path: url.pathname });
}
export default { fetch: handler };jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"module": "nodenext",
"types": []
}
} In your editor
Per the Deno documentation, VS Code needs the Deno extension, turned on for the workspace with the command "Deno: Initialize Workspace Configuration"; other editors start Deno's language server with deno lsp. Without it, the editor's built-in TypeScript checks the file as tsc would and does not know the Deno namespace.
Sources
- deno check · Deno docs
- TypeScript support · Deno docs
- Configuring TypeScript · Deno docs
- deno serve · Deno docs
- deno task · Deno docs
- Set up your environment · Deno docs
Last reviewed 20 October 2026.