{"record":{"id":"d09814b752b9ce1b","repo":"biomejs/biome","slug":"setter-signatures-are-not-supported-in-errorconstructor","errorCode":null,"errorMessage":"setter signatures are not supported in ErrorConstructor","messagePattern":"setter signatures are not supported in ErrorConstructor","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/codegen/src/generate_global_types/lower.rs","lineNumber":2674,"sourceCode":"                    let lowered = lower_error_constructor_property_member(&member)?;\n                    if prototype.replace(lowered).is_some() {\n                        bail!(\"ErrorConstructor has multiple prototype properties\");\n                    }\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,","sourceCodeStart":2656,"sourceCodeEnd":2692,"githubUrl":"https://github.com/biomejs/biome/blob/3835945f0638c88162351318b7bc8b64c5f2fba7/xtask/codegen/src/generate_global_types/lower.rs#L2656-L2692","documentation":"Build-time error thrown while lowering the ErrorConstructor (the `Error` constructor's static interface) type members. Setter signatures (e.g. `set stackTraceLimit(v: number)`) are not representable in the generated ErrorConstructorSignatures structure, so the lowering bails. The declaration must express static writable members as plain properties.","triggerScenarios":"Running the global-types codegen when the ErrorConstructor declaration contains a `set name(...) { ... }` setter signature member.","commonSituations":"Regenerating global types against a newer/alternative lib.es5.d.ts where static writable fields on ErrorConstructor are declared as get/set accessor pairs instead of properties.","solutions":["Replace the setter with a plain mutable property declaration in the ErrorConstructor source (accessor pair -> single property).","Add TsSetterSignatureTypeMember support in the ErrorConstructor lowering arm if accessor members become required."],"exampleFix":"// before\ndeclare var Error: ErrorConstructor & {\n  set captureStackTraceLimit(v: number);\n}\n// after\ndeclare var Error: ErrorConstructor & {\n  captureStackTraceLimit: number;\n}","handlingStrategy":"validation","validationCode":"// Reject setter members in ErrorConstructor sources before lowering\nfn has_setter(source: &str) -> bool {\n    source.lines().any(|l| l.trim().starts_with(\"set \"))\n}","typeGuard":"fn is_lowerable_ctor_member(m: &AnyTsTypeMember) -> bool {\n    !matches!(m, AnyTsTypeMember::TsSetterSignatureTypeMember(_))\n}","tryCatchPattern":null,"preventionTips":["Model static writable fields on ErrorConstructor as plain properties, not get/set pairs.","Diff updated d.ts inputs for accessor syntax before running codegen.","Document the accepted member kinds for ErrorConstructor in the codegen module docs."],"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"}