From 33fc0c7d0ee22321638e4e901a16039268258efd Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Wed, 30 Sep 2026 07:59:52 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Declare=20=5F=5Finteractors=20wi?= =?UTF-8?q?thout=20the=20module=20keyword?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `deno test -A` fails on every pull request: TS1540 A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead. module globalThis { at packages/globals/src/globals.ts:48:10 Deno 2.9 bundles TypeScript 6, which turned the deprecated `module X {}` namespace syntax into an error. The `deno-lint-ignore prefer-namespace-keyword` sitting above it is a fossil of when it was only a lint warning. Nesting `module globalThis` inside `declare global` was never doing anything: `declare global` is already the global scope, so a `var` declared directly in it augments `globalThis` the same way. Both ignore comments go with the wrapper — `no-var` does not fire on an ambient declaration, and `ban-unused-ignore` catches it if it is left behind. `deno test -A` now passes: 31 tests, 408 steps. --- packages/globals/src/globals.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/globals/src/globals.ts b/packages/globals/src/globals.ts index 7e7fcff4..152b747c 100644 --- a/packages/globals/src/globals.ts +++ b/packages/globals/src/globals.ts @@ -44,11 +44,7 @@ export type InteractionOptions = InteractorOptions & { export type InteractionWrapper = (perform: () => Promise, interaction: Interaction) => Operation; declare global { - // deno-lint-ignore prefer-namespace-keyword - module globalThis { - // deno-lint-ignore no-var - var __interactors: Globals; - } + var __interactors: Globals; } if (!globalThis.__interactors) {