Deno Core Features: Part 2

Learn how Deno allows us to follow modern development patterns, and write clean and maintainable code.

Typescript support

We can write our programs with Deno using JavaScript or Typescript. Either way, it will automatically compile Typescript. However, using Typescript has many benefits like type checking and IntelliSense features in IDEs like VS Code. Developers can concentrate on writing code and not lose time with intermediate, tedious steps.

ES Modules

Deno can consume ES modules from remote URLs or local paths. Due to this, there is no need to use a package management tool, like npm or Yarn, to import remote modules. This means one less tech component to care about.

// Remote modules import
import { serve } from  ''

// Local modules import
import { concat, split } from './utils/string-util.ts'

⚠️ Keep in mind to specify the complete file name, including its extension, since Deno adopts a browser-like module resolution.

By default, Deno saves the remote modules directly in the cache after importing them, making the code execution much faster for the following calls.
The snippet below imports the HTTP server file from the Deno standard library. The latest module version is downloaded unless we need a specific release. In this case, we can add the target version to the import path.

Get hands-on with 1200+ tech skills courses.