From 5d06dfc831abbbfe3d1ebc420cf41c59dffbabfc Mon Sep 17 00:00:00 2001 From: Rohan170603 <163886014+Rohan170603@users.noreply.github.com> Date: Mon, 17 Aug 2026 13:52:34 +0530 Subject: [PATCH 1/3] docs: remove outdated @ts-types directive from Express tutorial --- examples/tutorials/express.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/express.md b/examples/tutorials/express.md index 2b49ecfa1..dc65a0b23 100644 --- a/examples/tutorials/express.md +++ b/examples/tutorials/express.md @@ -59,8 +59,11 @@ console.log(`Server is running on http://localhost:8000`); You may notice that your editor is complaining about the `req` and `res` parameters. This is because Deno does not have types for the `express` module. -To fix this, you can import the Express types file directly from npm. Add the -following comment to the top of your `main.ts` file: +**If you're using Deno 2.2.1 or later**, Deno automatically resolves the types +from `@types/express`—you don't need to add anything. + +**For earlier versions of Deno (pre-2.2.1)**, you needed to manually add a +`@ts-types` comment: ```ts // @ts-types="npm:@types/express@4.17.15" From e31cf3245ad80adfbc442f60cb8c0d40a5403fc5 Mon Sep 17 00:00:00 2001 From: Rohan170603 <163886014+Rohan170603@users.noreply.github.com> Date: Mon, 17 Aug 2026 14:11:17 +0530 Subject: [PATCH 2/3] docs: remove outdated @ts-types directive from npm example --- examples/scripts/npm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/scripts/npm.ts b/examples/scripts/npm.ts index c3f186f90..eb3f004bb 100644 --- a/examples/scripts/npm.ts +++ b/examples/scripts/npm.ts @@ -9,13 +9,13 @@ * @group Basics * * Use JavaScript modules from npm in your Deno programs with the "npm:" - * specifier in your imports. + * specifier in your imports. As of Deno 2.2.1, TypeScript types for npm + * packages are resolved automatically. */ // Import the express module from npm using an npm: prefix, and appending a // version number. Dependencies from npm can be configured in an import map // also. -// @ts-types="npm:@types/express@4" import express, { type Request, type Response } from "npm:express@4.18.2"; // Create an express server From e730a43fa576d2b7d57e145e3fa95a722be684ff Mon Sep 17 00:00:00 2001 From: Rohan170603 <163886014+Rohan170603@users.noreply.github.com> Date: Mon, 17 Aug 2026 14:24:25 +0530 Subject: [PATCH 3/3] fix: update last_modified date for express.md --- examples/tutorials/express.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/express.md b/examples/tutorials/express.md index dc65a0b23..3897ad53c 100644 --- a/examples/tutorials/express.md +++ b/examples/tutorials/express.md @@ -1,5 +1,5 @@ --- -last_modified: 2025-07-14 +last_modified: 2026-08-17 title: "How to use Express with Deno" description: "Step-by-step guide to using Express.js with Deno. Learn how to set up an Express server, configure routes, handle middleware, and build REST APIs using Deno's Node.js compatibility features." url: /examples/express_tutorial/