biomejs/biome · error

metavariables are not supported in {}

Error message

metavariables are not supported in {}

What it means

Emitted by lower_disposable_type_member in xtask's generate_global_types lowering when a member of the disposable interface declaration parses as a JsMetavariable node. The lowering only accepts a single `[Symbol.dispose](): void`-style computed method signature; metavariables are template placeholders that appear when the fixture uses codegen metavariable syntax instead of a concrete member.

Source

Thrown at xtask/codegen/src/generate_global_types/lower.rs:2299

    member: AnyTsTypeMember,
    spec: DisposableGlobalSpec,
) -> Result<LoweredTypeMember> {
    match member {
        AnyTsTypeMember::TsMethodSignatureTypeMember(member) => {
            lower_disposable_method_signature(&member, spec)
        }
        AnyTsTypeMember::TsPropertySignatureTypeMember(_) => {
            bail!("properties are not supported in {}", spec.interface_name)
        }
        AnyTsTypeMember::TsCallSignatureTypeMember(_)
        | AnyTsTypeMember::TsConstructSignatureTypeMember(_) => {
            bail!("signatures are not supported in {}", spec.interface_name)
        }
        AnyTsTypeMember::JsBogusMember(_) => {
            bail!("bogus members are not supported in {}", spec.interface_name)
        }
        AnyTsTypeMember::JsMetavariable(_) => {
            bail!("metavariables are not supported in {}", spec.interface_name)
        }
        AnyTsTypeMember::TsGetterSignatureTypeMember(_) => {
            bail!(
                "getter signatures are not supported in {}",
                spec.interface_name
            )
        }
        AnyTsTypeMember::TsIndexSignatureTypeMember(_) => {
            bail!(
                "index signatures are not supported in {}",
                spec.interface_name
            )
        }
        AnyTsTypeMember::TsSetterSignatureTypeMember(_) => {
            bail!(
                "setter signatures are not supported in {}",
                spec.interface_name
            )

View on GitHub (pinned to 3835945f06)

Solutions

  1. Replace the metavariable placeholder in the interface fixture with the concrete member `[Symbol.dispose](): void` (or the asyncDispose equivalent).
  2. Check whether the generator that emits this fixture is inserting raw metavariable text and fix the emitting template.
  3. Re-run the codegen and confirm the lowered Disposable globals build.

Example fix

// before (fixture)
interface Disposable {
  $$METAVARIABLE$$
}
// after
interface Disposable {
  [Symbol.dispose](): void;
}
Defensive patterns

Strategy: validation

Validate before calling

// Ensure no metavariable placeholders leaked into the fixture:
//   grep -rnE '\$\$|METAVARIABLE' xask-fixture-dir/globals.d.ts
// (adjust path/pattern to the project's metavariable syntax)

Prevention

When it happens

Trigger: A disposable-interface fixture (Symbol.dispose / Symbol.asyncDispose global declaration) contains a metavariable placeholder (e.g. `$$METAVARIABLE$$` or a Biome metavariable node) inside the interface body, and `cargo run -p xtask codegen` is run.

Common situations: A contributor copies a snippet from a Biome grammar/rule template (which uses metavariables) into a type-declaration fixture instead of writing a concrete member; codegen tooling pastes an unresolved placeholder into the d.ts.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of biomejs/biome@3835945f06 (2026-09-13). Data as JSON: /api/errors/11bd043c91ff2f15. Report an issue: GitHub.