From 3da8759c37f4b51fa9dad06270243b0781a8d4a5 Mon Sep 17 00:00:00 2001 From: Andrew Levada Date: Tue, 18 Aug 2026 14:49:06 +0300 Subject: [PATCH] docs(desktop): add type checking section to desktop configuration doc --- runtime/desktop/configuration.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/runtime/desktop/configuration.md b/runtime/desktop/configuration.md index 8fa2c85bd..b3a13a42e 100644 --- a/runtime/desktop/configuration.md +++ b/runtime/desktop/configuration.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-30 +last_modified: 2026-08-18 title: "Configuration" description: "Configure deno desktop in deno.json: app metadata, icons, deep-link URL schemes, backend selection, output paths, error reporting, and the auto-update server." --- @@ -272,3 +272,18 @@ Configuration is validated at the start of `deno desktop`: - `app.deepLinks` entries must be valid, non-reserved URL schemes. Errors are reported with the offending `deno.json` location. + +## Type checking + +By default, Deno type-checks code against the runtime's global scope (the +`deno.window` library), which does not include desktop-only types such as +[`Deno.BrowserWindow`](/api/deno/~/Deno.BrowserWindow). To get editor +completions from the language server, set `compilerOptions.lib` in `deno.json`: + +```json title="deno.json" +{ + "compilerOptions": { + "lib": ["deno.desktop", "deno.unstable", "node"] + } +} +```