On this page
deno check
Type-check a program without execution.
Command Jump to heading
deno check [OPTIONS] <FILE>
- Download and type-check FILE
Synopsis Jump to heading
deno check [--import-map <FILE>] [--no-remote] [-q|--quiet] [--no-npm]
[--node-modules-dir[=<node-modules-dir>]] [--vendor[=<vendor>]]
[-c|--config <FILE>] [--no-config] [-r|--reload[=<CACHE_BLOCKLIST>...]]
[--lock [<FILE>]] [--lock-write] [--no-lock] [--cert <FILE>] [--all] <FILE>
deno check -h|--help
Description Jump to heading
Type-check without execution.
deno check https://deno.land/std/http/file_server.ts
Unless --reload
is specified, this command will not re-download already cached
dependencies.
Cache Location Jump to heading
Modules cached are stored in $DENO_DIR
, a centralized directory. Its location
varies by OS. For instance, on macOS, it's typically
/Users/user/Library/Caches/deno
.
You can see the cache location by running deno info
with no arguments.
Cache Invalidation Jump to heading
Future runs of this module will trigger no downloads or compilation unless the
--reload
option is specified.
Arguments Jump to heading
FILE
- The module entrypoint.
The module entrypoint can be a local file or a remote URL. Dependencies are detected from it's imports.
Options Jump to heading
-
--import-map <FILE>
Load import map file from local file or remote URL. Docs: https://docs.deno.com/runtime/manual/basics/import_maps Specification: https://wicg.github.io/import-maps/ Examples: https://github.com/WICG/import-maps#the-import-map
-
--no-remote
Do not resolve remote modules
-
-q, --quiet
Suppress diagnostic output
-
--no-npm
Do not resolve npm modules
-
--node-modules-dir[=<node-modules-dir>]
Enables or disables the use of a local node_modules folder for npm packages
[possible values: true, false]
-
--vendor[=<vendor>]
UNSTABLE: Enables or disables the use of a local vendor folder for remote modules and node_modules folder for npm packages
[possible values: true, false]
-
-c, --config <FILE>
The configuration file can be used to configure different aspects of deno including TypeScript, linting, and code formatting. Typically the configuration file will be called
deno.json
ordeno.jsonc
and automatically detected; in that case this flag is not necessary. See https://deno.land/manual@v1.41.3/getting_started/configuration_file -
--no-config
Disable automatic loading of the configuration file
-
-r, --reload[=<CACHE_BLOCKLIST>...]
Reload source code cache (recompile TypeScript).
The
CACHE_BLOCKLIST
is a comma separated list of arguments passed to the --reload option. E.g.--reload=https://deno.land/std/fs/utils.ts,https://deno.land/std/fmt/colors.ts
-
--lock [<FILE>]
Check the specified lock file. If value is not provided, defaults to "deno.lock" in the current working directory.
-
--lock-write
Force overwriting the lock file
-
--no-lock
Disable auto discovery of the lock file
-
--cert <FILE>
Load the certificate from a PEM encoded file
-
--all
Type-check all code, including remote modules and npm packagesIf the value of '--check=all' is supplied, diagnostic errors from remote modules will be included.
-
-h, --help
Print help (see a summary with '-h')
Examples Jump to heading
- Cache the dependencies of a module
deno check https://deno.land/std/http/file_server.ts
- Force a cache update
deno check --reload https://deno.land/std/http/file_server.ts
- Cache a known npm module
deno check npm:express
- Reload everything
deno check --reload
- Reload only standard modules
deno check --reload=https://deno.land/std
- Reloads specific modules
deno check --reload=https://deno.land/std/fs/utils.ts,https://deno.land/std/fmt/colors.ts
- Reload all npm modules
deno check --reload=npm:
- Reload specific npm module
deno check --reload=npm:chalk