Deno is a secure runtime for JavaScript and TypeScript. v1 was released May 13, 2020. Its core team includes Ryan Dahl, the creator of Node.


Deno is the first runtime that has me interested in running JavaScript/TypeScript on a server (or in serverless functions).

Deno's main innovations are:

  1. Secure by default
  2. No package manager


deno is shipped as a single executable. Install:

curl -fsSL | sh

Add to ~/.zshrc:

export DENO_INSTALL="$HOME/.deno"


Run untrusted, third-party programs safely from the command line by referencing the source URL:

% deno run
Welcome to Deno 🦕

By default, the program does not have access to disk, network, subprocesses, or environment variables. Like browsers, it runs in a secure sandbox. You can't open files or sockets.

The user has to opt in to those behaviors with flags:



There is no package.json or centralized package management server. The core team feels that style of package manager has caused more harm than good.

Instead, modules are imported explicitly from a server using URLs:

import { serve } from "";

Deno treats modules and files as the same concept. This is how browsers think about ES modules. In Node, this is not the case but in Deno, this is explicit.

Pika CDN is one of the best module servers for Deno. It manages NPM packages that are bundled as ES modules and respects Semantic Versioning:

import { Component, render } from "^10.0.0";

To handle private modules, set up a web server.

See your program's module dependencies:

% deno info

Standard Library

The modules are the standard lib that the JavaScript community has wanted for a long time.

[The Deno Standard Library] is a loose port of Go's standard library. When in doubt, simply port Go's source code, documentation, and tests. There are many times when the nature of JavaScript, TypeScript, or Deno itself justifies diverging from Go, but if possible we want to leverage the energy that went into building Go. We generally welcome direct ports of Go's code.


The TypeScript compiler is compiled into Deno. The team is rewriting type checking in Rust for better performance. Deno was originally prototyped in Go but is now written in Rust.

There are many TypeScript available on npm through @types/ and DefinitelyTyped. If the remote module server sends an HTTP header X-TypeScript-Types and it has the content of a URL, Deno will use those types for type checking.

Even better, because the code has already been bundled, Deno accesses those types without the overhead of transpilation.

Deno ships type definitions for the runtime. Print them:

% deno types


Install command line programs:

% deno install --allow-read
Successfully installed catj
Add /Users/croaky/.deno/bin to PATH
  export PATH="/Users/croaky/.deno/bin:$PATH"

deno is a Swiss Army knife of tools installed as an executable on your machine, a CI machine, or any machine.