From e6ffff7fb09ba9021e986955fcfd8b55206569aa Mon Sep 17 00:00:00 2001 From: Julien Poissonnier Date: Wed, 10 Apr 2024 10:35:54 +0200 Subject: [PATCH] Add section about TypeScript versions --- .../docs/languages-sdks/javascript/_index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/themes/default/content/docs/languages-sdks/javascript/_index.md b/themes/default/content/docs/languages-sdks/javascript/_index.md index 60762f4f0ee..82a3fa693be 100644 --- a/themes/default/content/docs/languages-sdks/javascript/_index.md +++ b/themes/default/content/docs/languages-sdks/javascript/_index.md @@ -175,6 +175,22 @@ Tools like VS Code will give you completion lists, live error reporting and inli Pulumi TypeScript in VS Code +## TypeScript Versions + +Pulumi ships with a bundled version of TypeScript 3.8.3 and uses this compiler by default. You can use a different version by adding the desired version of TypeScript to your package.json file. When Pulumi runs a TypeScript program, it will first attempt to load the compiler from the local node_modules directory, and then fallback to the bundled version. Pulumi supports all TypeScript versions from 3.8 and up, including the latest TypeScript 5 release. + +```json +{ + "name": "my-package", + "version": "1.0.0", + "dependencies": { + ... + "typescript": "^5.4.2", + ... + } +} +``` + ## Disabling built in TypeScript support You can disable the built in TypeScript support by changing the `runtime` setting in `Pulumi.yaml` to look like the following: