Skip to content

Commit 2453b46

Browse files
alison-mkCopilot
andauthored
[all hosts] (Troubleshooting) Add TypeScript version number (#807)
* [all hosts] (Troubleshooting) Add TypeScript version number * Update docs/develop/typescript-restrictions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1148871 commit 2453b46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/develop/typescript-restrictions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
---
22
title: TypeScript restrictions in Office Scripts
33
description: The specifics of the TypeScript compiler and linter used by the Office Scripts Code Editor.
4-
ms.date: 10/01/2022
4+
ms.date: 11/21/2025
55
ms.localizationpriority: medium
66
---
77

88
# TypeScript restrictions in Office Scripts
99

1010
Office Scripts use the TypeScript language. For the most part, any TypeScript or JavaScript code will work in Office Scripts. However, there are a few restrictions enforced by the Code Editor to ensure your script works consistently and as intended with your Excel workbook.
1111

12+
> [!NOTE]
13+
> Office Scripts uses TypeScript version 4.0.3. TypeScript features added in subsequent versions are not supported in Office Scripts.
14+
1215
## No 'any' type in Office Scripts
1316

1417
Writing [types](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) is optional in TypeScript, because the types can be inferred. However, Office Scripts requires that a variable can't be of [type any](https://www.typescriptlang.org/docs/handbook/basic-types.html#any). Both explicit and implicit `any` are not allowed in Office Scripts. These cases are reported as errors.

0 commit comments

Comments
 (0)