Skip to main content
On this page

deno check

Command-line Usage

deno check [OPTIONS] [file]...

Download and type-check without execution.

deno check jsr:@std/http/file-server

Unless --reload is specified, this command will not re-download already cached dependencies


Dependency management options Jump to heading

--import-map Jump to heading

Load import map file from local file or remote URL.

--lock Jump to heading

Check the specified lock file. (If value is not provided, defaults to "./deno.lock").

--no-lock Jump to heading

Disable auto discovery of the lock file.

--no-npm Jump to heading

Do not resolve npm modules.

--no-remote Jump to heading

Do not resolve remote modules.

--node-modules-dir Jump to heading

Sets the node modules management mode for npm packages.

--reload Jump to heading

Short flag: -r

Reload source code cache (recompile TypeScript) no value Reload everything jsr:@std/http/file-server,jsr:@std/assert/assert-equals Reloads specific modules npm: Reload all npm modules npm:chalk Reload specific npm module.

--vendor Jump to heading

Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages.

Options Jump to heading

--all Jump to heading

Type-check all code, including remote modules and npm packages.

--allow-import Jump to heading

Short flag: -I

Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value: deno.land:443,jsr.io:443,esm.sh:443,raw.githubusercontent.com:443,user.githubusercontent.com:443.

--cert Jump to heading

Load certificate authority from PEM encoded file.

--config Jump to heading

Short flag: -c

Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called deno.json or deno.jsonc and automatically detected; in that case this flag is not necessary.

--doc Jump to heading

Type-check code blocks in JSDoc as well as actual code.

--doc-only Jump to heading

Type-check code blocks in JSDoc and Markdown only.

--no-config Jump to heading

Disable automatic loading of the configuration file.

Example Jump to heading

Type-check without execution.

example.ts
const x: string = 1 + 1n;
deno check example.ts