On this page
deno check
deno check type-checks your TypeScript (or JavaScript) code without running
it. This is useful in CI pipelines or before deploying to catch type errors
early. For more on TypeScript in Deno, see the
TypeScript guide.
Basic usage Jump to heading
deno check main.ts
Check multiple files:
deno check src/server.ts src/utils.ts
Type-checking remote modules Jump to heading
By default, only local modules are type-checked. Use --all to also type-check
remote dependencies:
deno check --all main.ts
Type-checking JavaScript files Jump to heading
If you have a JavaScript project and want to type-check it without adding
// @ts-check to every file, use the --check-js flag:
deno check --check-js main.js
Using in CI Jump to heading
deno check exits with a non-zero status code if there are type errors, making
it suitable for CI pipelines:
deno check main.ts && echo "Types OK"
Note that deno test and
deno bench already perform type-checking by
default, so you don't need a separate deno check step if you're already
running tests. Use deno check when you want to type-check without running
anything — for example, as a fast early step in CI:
deno check main.ts
deno lint
deno test
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
--frozen<BOOLEAN>optionalError out if lockfile is out of date.
Load import map file from local file or remote URL.
--lock<FILE>optionalCheck the specified lock file. (If value is not provided, defaults to "./deno.lock").
--no-lockDisable auto discovery of the lock file.
--no-npmDo not resolve npm modules.
--no-remoteDo not resolve remote modules.
--node-modules-dir<MODE>optionalSets the node modules management mode for npm packages.
--reload, -r<CACHE_BLOCKLIST>optionalReload 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<vendor>optionalToggles local vendor folder usage for remote modules and a node_modules folder for npm packages.
Options Jump to heading
--allType-check all code, including remote modules and npm packages.
--allow-import, -I<IP_OR_HOSTNAME>optionalAllow 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.esm.sh:443,cdn.jsdelivr.net:443,raw.githubusercontent.com:443,gist.githubusercontent.com:443.
--cert<FILE>Load certificate authority from PEM encoded file.
--check-jsEnable type-checking of JavaScript files (equivalent to compilerOptions.checkJs: true).
--conditions<conditions>Use this argument to specify custom conditions for npm package exports. You can also use DENO_CONDITIONS env var. .
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.
--deny-import<IP_OR_HOSTNAME>optionalDeny importing from remote hosts. Optionally specify denied IP addresses and host names, with ports as necessary.
--docType-check code blocks in JSDoc as well as actual code.
--doc-onlyType-check code blocks in JSDoc and Markdown only.
--minimum-dependency-age<minimum-dependency-age>(Unstable) The age in minutes, ISO-8601 duration or RFC3339 absolute timestamp (e.g. '120' for two hours, 'P2D' for two days, '2025-09-16' for cutoff date, '2025-09-16T12:00:00+00:00' for cutoff time, '0' to disable).
--no-code-cacheDisable V8 code cache feature.
--no-configDisable automatic loading of the configuration file.
--v8-flags<V8_FLAGS>optionalTo see a list of all available flags use --v8-flags=--help
Flags can also be set via the DENO_V8_FLAGS environment variable.
Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable.