Extension models: document/resolve implicit-any in execute parameters when imported by test files
Opened by bixu · 4/21/2026· Shipped 4/21/2026
Problem Statement
When an extension model file (e.g. kubeconfig.ts) is imported by a _test.ts file, deno test type-checks the model source. The execute function parameters _args and context have no type annotations (as recommended by the skill: "No type annotations: Avoid TypeScript types in execute parameters"), which triggers TS7006 noImplicitAny errors:
TS7006 [ERROR]: Parameter '_args' implicitly has an 'any' type.
execute: async (_args, context) => {
TS7006 [ERROR]: Parameter 'context' implicitly has an 'any' type.This fails CI when deno test is run without --no-check.
Current Workaround
We added per-function suppress comments to the affected model file:
// deno-lint-ignore no-explicit-any
execute: async (_args: any, context: any) => {This works but is inconsistent with the skill guidance and requires every model author to know about the workaround. Models whose test files don't directly import the model source (e.g. kubevirt.ts, which has no kubevirt_test.ts) silently escape the problem — creating an inconsistent experience.
Proposed Solutions (for discussion)
deno.jsonwithcompilerOptions: { noImplicitAny: false }at the repo root — allows unannotated execute parameters everywhere, matching the skill guideline. Risk: could mask real type errors in non-execute code.--no-checkflag ondeno testin CI — skips type-checking entirely. Simple, but loses type safety for the rest of the extension code.Ship type definitions for the swamp context — a
@swamp/typespackage or similar that extension authors can import forExecuteContext. Would make execute functions fully type-safe and eliminate the workaround. Highest effort but best outcome.Document the workaround in the extension model skill — lowest effort, keeps the current state but at least makes it discoverable.
Environment
- swamp version: 20260420.232916.0
- Deno: type-checking enabled by default in
deno test - Repro: any extension model whose test file does
import { model } from "./my_model.ts"
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.