{"record":{"id":"599dd5fa2eef2844","repo":"biomejs/biome","slug":"metavariables-are-not-supported-in-errorconstructor","errorCode":null,"errorMessage":"metavariables are not supported in ErrorConstructor","messagePattern":"metavariables are not supported in ErrorConstructor","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/codegen/src/generate_global_types/lower.rs","lineNumber":2677,"sourceCode":"                    }\n                }\n                AnyTsTypeMember::TsMethodSignatureTypeMember(_) => {\n                    bail!(\"method signatures are not supported in ErrorConstructor\")\n                }\n                AnyTsTypeMember::JsBogusMember(_) => {\n                    bail!(\"bogus members are not supported in ErrorConstructor\")\n                }\n                AnyTsTypeMember::TsGetterSignatureTypeMember(_) => {\n                    bail!(\"getter signatures are not supported in ErrorConstructor\")\n                }\n                AnyTsTypeMember::TsIndexSignatureTypeMember(_) => {\n                    bail!(\"index signatures are not supported in ErrorConstructor\")\n                }\n                AnyTsTypeMember::TsSetterSignatureTypeMember(_) => {\n                    bail!(\"setter signatures are not supported in ErrorConstructor\")\n                }\n                AnyTsTypeMember::JsMetavariable(_) => {\n                    bail!(\"metavariables are not supported in ErrorConstructor\")\n                }\n            }\n        }\n    }\n\n    Ok(ErrorConstructorSignatures {\n        constructor: constructor.context(\"ErrorConstructor is missing a construct signature\")?,\n        call: call.context(\"ErrorConstructor is missing a call signature\")?,\n        prototype,\n    })\n}\n\n/// Lowers supported `ErrorConstructor` static properties.\nfn lower_error_constructor_property_member(\n    property: &TsPropertySignatureTypeMember,\n) -> Result<LoweredTypeMember> {\n    let name = lower_object_member_name(property.name()?)?;\n    if name.text() != \"prototype\" {","sourceCodeStart":2659,"sourceCodeEnd":2695,"githubUrl":"https://github.com/biomejs/biome/blob/3835945f0638c88162351318b7bc8b64c5f2fba7/xtask/codegen/src/generate_global_types/lower.rs#L2659-L2695","documentation":"Build-time error from the ErrorConstructor lowering in xtask/codegen. A member of the ErrorConstructor declaration parsed as JsMetavariable (incomplete/unparsed syntax), which cannot be converted into a constructor signature entry, so the generator aborts via bail!.","triggerScenarios":"Running the global-types codegen when any member inside the ErrorConstructor type contains malformed or incomplete syntax that the TypeScript parser recovers as a metavariable.","commonSituations":"A truncated lib.d.ts input, a merge conflict marker left in the bundled type source, or a grammar change causing previously valid members to parse incompletely.","solutions":["Repair the ErrorConstructor declaration so all members are syntactically complete.","Re-run generation with the current grammar (`just gen-grammar typescript` then the codegen) so members parse concretely.","Handle JsMetavariable explicitly in the ErrorConstructor match if it becomes an expected input."],"exampleFix":"// before (incomplete member)\ninterface ErrorConstructor {\n  captureStackTrace\n// after\ninterface ErrorConstructor {\n  captureStackTrace(targetObject: object, constructorOpt?: Function): void;\n}","handlingStrategy":"validation","validationCode":"// Fail fast if the ErrorConstructor source still contains conflict markers or truncation\nfn source_is_complete(source: &str) -> Result<(), String> {\n    if source.contains(\"<<<<<<<\") || source.contains(\">>>>>>>\") {\n        return Err(\"merge conflict markers in ErrorConstructor source\".into());\n    }\n    Ok(())\n}","typeGuard":"fn is_concrete_ctor_member(m: &AnyTsTypeMember) -> bool {\n    !matches!(m, AnyTsTypeMember::JsMetavariable(_))\n}","tryCatchPattern":null,"preventionTips":["Never commit type sources containing merge conflict markers or truncated members.","Re-run grammar codegen after parser/grammar changes so inputs parse concretely.","Sanity-check parsed output (count metavariables) before invoking lowering."],"tags":["codegen","build","typescript"],"backgroundTag":"unsupported-operation","analyzedSha":"3835945f0638c88162351318b7bc8b64c5f2fba7","analyzedAt":"2026-09-13T15:11:16.919Z","contentChangedAt":"2026-09-13T15:11:16.919Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}