{"record":{"id":"d8f6e9b6f4fa6d99","repo":"biomejs/biome","slug":"getter-signatures-are-not-supported-in-the-error-global","errorCode":null,"errorMessage":"getter signatures are not supported in the Error global","messagePattern":"getter signatures are not supported in the Error global","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/codegen/src/generate_global_types/lower.rs","lineNumber":2536,"sourceCode":"                kind: LoweredMemberKind::Named { optional },\n                type_reference,\n            }))\n        }\n        AnyTsTypeMember::TsMethodSignatureTypeMember(_) => {\n            bail!(\"method signatures are not supported in the Error global\")\n        }\n        AnyTsTypeMember::TsCallSignatureTypeMember(_)\n        | AnyTsTypeMember::TsConstructSignatureTypeMember(_) => {\n            bail!(\"Error global signatures must be declared on ErrorConstructor\")\n        }\n        AnyTsTypeMember::JsBogusMember(_) => {\n            bail!(\"bogus members are not supported in the Error global\")\n        }\n        AnyTsTypeMember::JsMetavariable(_) => {\n            bail!(\"metavariable members are not supported in the Error global\")\n        }\n        AnyTsTypeMember::TsGetterSignatureTypeMember(_) => {\n            bail!(\"getter signatures are not supported in the Error global\")\n        }\n        AnyTsTypeMember::TsIndexSignatureTypeMember(_) => {\n            bail!(\"index signatures are not supported in the Error global\")\n        }\n        AnyTsTypeMember::TsSetterSignatureTypeMember(_) => {\n            bail!(\"setter signatures are not supported in the Error global\")\n        }\n    }\n}\n\n/// Validates supported optional `Error` members.\nfn lower_optional_error_member_reference(\n    name: &Text,\n    type_reference: LoweredTypeReference,\n) -> Result<LoweredTypeReference> {\n    match (name.text(), type_reference) {\n        (\"stack\", LoweredTypeReference::Predefined(\"GLOBAL_STRING_ID\")) => {\n            Ok(LoweredTypeReference::Predefined(\"GLOBAL_STRING_ID\"))","sourceCodeStart":2518,"sourceCodeEnd":2554,"githubUrl":"https://github.com/biomejs/biome/blob/3835945f0638c88162351318b7bc8b64c5f2fba7/xtask/codegen/src/generate_global_types/lower.rs#L2518-L2554","documentation":"A build-time error from the same Error-global lowering code in xtask/codegen. The generator intentionally rejects TsGetterSignatureTypeMember members on the Error global because the generated Rust representation of Error's type members has no slot for accessor (getter) signatures. The declaration source must only contain plain properties and methods.","triggerScenarios":"Running the global-types codegen when the Error global declaration contains a `get foo() { ... }` getter signature member.","commonSituations":"Updating the bundled TypeScript lib source for Error to a version that models a property as a getter (e.g. `get stack()`); porting members from a DOM or newer lib.es5 d.ts where accessors are used.","solutions":["Rewrite the getter in the source declaration as a plain readonly property (e.g. `get stack(): string` -> `readonly stack: string`).","If accessors must be supported, extend the lowering code to map getter signatures onto property signatures with a readonly flag."],"exampleFix":"// before\ndeclare var Error: {\n  get stackTraceLimit(): number;\n}\n// after\ndeclare var Error: {\n  readonly stackTraceLimit: number;\n}","handlingStrategy":"validation","validationCode":"// Check the Error declaration source for getter members before codegen\nfn has_getter(source: &str) -> bool {\n    source.lines().any(|l| {\n        let t = l.trim();\n        t.starts_with(\"get \") || t.starts_with(\"readonly get \")\n    })\n}","typeGuard":"fn is_lowerable_member(m: &AnyTsTypeMember) -> bool {\n    !matches!(m, AnyTsTypeMember::TsGetterSignatureTypeMember(_))\n}","tryCatchPattern":null,"preventionTips":["Express accessor members in source type data as plain (readonly) properties.","Audit new lib.es5/lib.core d.ts updates for `get ` members before regenerating globals.","Keep the supported member list in the lowering code in sync with the type sources you feed it."],"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-14T00:17:10.932Z"}