What Is Deno?

Deno is a JavaScript and TypeScript runtime that lets you write programs in either languages and execute them from the command line

Deno programs can access resources on the host computer, such as the filesystem and environment variables.

What is a runtime system?

As for Deno, we can say that’s what makes Javascript run outside the browser, adding a series of features that it is not possible to find in the Javascript engine itself.

Deno is the brainchild of Node’s creator, Ryan Dahl, who created Deno to address what he sees as the design flaws in Node.

The goal is to provide a secure scripting environment that treats TypeScript as a first-class language, and that is as browser-compatible as possible (where practical).

Security Features

Deno is designed to be secure out of the box

All code is executed in a secure sandbox by default, which means you need to give explicit permission to allow a program to access the filesystem or the network.

Programs can be granted permissions with the following command-line flags:

  • -A, –allow-all: allow all permissions (disables all security).
  • –allow-env: allow getting and setting of environment variables.
  • –allow-hrtime: allow high resolution time measurement (can be used in timing attacks and fingerprinting).
  • –allow-net=: allow network access. Optionally takes a comma-separated whitelist of domains.
  • –allow-plugin: allow loading plugins (unstable feature).
  • –allow-read=: allow file system read access. Optionally takes a comma-separated whitelist of directories or files.
  • –allow-run: allow running subprocesses.
  • –allow-write=: allow file system write access. Optionally takes a comma-separated whitelist of directories or files.

First-class TypeScript Support

Deno can execute both JavaScript and TypeScript.

The cool stuff is that Typescript is supported as a first-class language like Javascript and you can load and run your Typescript code without any additional build steps that transpile your code into JavaScript first.

#software-development #software-engineering #programming #technology #javascript

Introduction to Deno: A Secure JavaScript & TypeScript Runtime
1.25 GEEK