Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLI
Assigneesstack72

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)

  1. deno.json with compilerOptions: { 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.

  2. --no-check flag on deno test in CI — skips type-checking entirely. Simple, but loses type safety for the rest of the extension code.

  3. Ship type definitions for the swamp context — a @swamp/types package or similar that extension authors can import for ExecuteContext. Would make execute functions fully type-safe and eliminate the workaround. Highest effort but best outcome.

  4. 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"
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 8 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

4/21/2026, 7:37:03 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack724/21/2026, 5:38:54 PM

Sign in to post a ripple.