Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Deno 5 min read How-to mediumAdept

A Gentle Intro to TypeScript

TypeScript catches the bugs that JavaScript's dynamic typing and implicit type coercion allow, such as add(1, "2") returning "12", by reporting them at compile time instead of at runtime. Annotating function parameters with `: number` is enough for the compiler to reject invalid calls and to infer return and variable types. The usual practice is to add just enough annotations and let inference handle the rest. Node projects need the `typescript` package and `tsc`, while Deno and Vite compile TypeScript transparently.

Related posts

  • Node just added TypeScript support. What does that mean for Deno?

    Deno easyNovice

    Node 22.6 added TypeScript execution via type stripping (stable in 23.6), which replaces annotations with whitespace but does no type checking, does not handle JSX/TSX, and still relies on tsc and a manually managed tsconfig.json. Deno instead ships an integrated toolchain: SWC strips types, a bundled TypeScript compiler powers `deno check` and the LSP, and fmt, lint, doc and compile all understand TypeScript with zero-config defaults. Deno also supports TSX/JSX, TypeScript in the REPL and Jupyter, and publishing raw TypeScript to JSR without transpilation or separate .d.ts files.

  • Deno 1.23 Release Notes

    Deno mediumAdept

    Deno 1.23 stops type-checking by default on `deno run`, `deno eval` and `deno cache`, using fast linear-time type-stripping instead, because TypeScript compiler checks are slow and editors already type-check via LSP; `--check` restores the old behavior and `--check=all` covers remote modules. The release also removes the event-loop-blocking `Deno.sleepSync` (with an `Atomics.wait` workaround), makes the file watcher track dynamic imports, adds `--cwd`, redirects and cross-platform `cat`/`xargs` to `deno task`, and returns BigInt for 64-bit FFI values to avoid precision loss. Breaking changes in `std/flags` make array collection and `--no-` negation opt-in via `collect` and `negatable`, and `assertThrows`/`assertRejects` now return the error instead of taking a callback.

  • Deno 1.21 Release Notes

    Deno mediumAdept

    Deno 1.21 adds a `deno check` subcommand and begins a phased plan to disable type checking by default in `deno run`, citing type-check cost as the main startup bottleneck and alignment with the proposed native JS type annotations. Other changes include browser-aligned `reportError` and global `"error"` event handling, cache-based incremental `deno fmt`/`deno lint` (second runs on deno_std drop from ~1.8s to ~0.11s), statistically driven iteration counts and grouped baselines in `deno bench`, and new unstable `Deno.spawn`/`Deno.spawnChild` subprocess APIs built on web streams. The release also brings VSCode extension improvements (config autodiscovery, per-path enablement, Testing API), REPL `--eval-file`, and testing utilities such as BDD, mocking, snapshots and FakeTime.

  • Deno 1.32: Enhanced Node.js Compatibility

    Deno mediumAdept

    Deno 1.32 improves Node.js compatibility by installing npm packages only when a bare specifier matches package.json, surfacing package.json errors lazily, adding DENO_NO_PACKAGE_JSON, and supporting createCipheriv/createDecipheriv in node:crypto. `deno compile` now handles dynamic imports and Web Workers, bundling statically analyzable specifiers automatically and others via a new --include flag. The release also adds --ext for running extensionless files, removes unstable WebGPU to cut binary size and startup time, moves std/encoding modules to top-level paths, and upgrades to TypeScript 5.0 (over 2x faster initial type-check when skipping remote modules) and V8 11.2. Users of 1.32.0 should upgrade to 1.32.1 due to a critical security issue.

  • Deno 1.27: Major IDE Improvements

    Deno mediumAdept

    Deno 1.27 exposes TypeScript inlay hints through its language server, with configurable hints for parameter names, inferred variable and return types, and enum values, and improves deno.land/x registry completions in editors. npm compatibility gains automatic type pickup from packages, @deno-types and @types/node directives, Node-API native module support behind --allow-ffi, lockfile v2 entries for npm packages, and dist-tag specifiers. Other changes include navigator.language, deno task stabilization with INIT_CWD and fail-fast behavior for async commands, a daily background upgrade check, stabilized Deno APIs, a compact lint report format, V8 10.8, Node 18.12 LTS compatibility, and removal of deprecated standard library APIs.

The quest for software engineering knowledge.

Look:
Layout: