{"record":{"id":"04c550e14598d67a","repo":"biomejs/biome","slug":"promiseconstructor-extends-clauses-are-not-supported","errorCode":null,"errorMessage":"PromiseConstructor extends clauses are not supported","messagePattern":"PromiseConstructor extends clauses are not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/codegen/src/generate_global_types/lower.rs","lineNumber":887,"sourceCode":"            }\n            DeclarationKind::DeclareFunction\n            | DeclarationKind::VariableDeclarator { .. }\n            | DeclarationKind::ImportEquals => {\n                bail!(\"value-side PromiseConstructor declarations are not supported\")\n            }\n        }\n\n        let declaration = source_cache\n            .find_interface_declaration(record)?\n            .with_context(|| {\n                format!(\n                    \"failed to find interface declaration {} at {:?}\",\n                    record.declared_name.text(),\n                    record.text_range\n                )\n            })?;\n        if declaration.extends_clause().is_some() {\n            bail!(\"PromiseConstructor extends clauses are not supported\");\n        }\n        if declaration.type_parameters().is_some() {\n            bail!(\"PromiseConstructor type parameters are not supported\");\n        }\n\n        validate_promise_methods(\n            &declaration,\n            PromiseMemberLocation::Static,\n            &mut saw_methods,\n        )?;\n        for member in declaration.members() {\n            if let AnyTsTypeMember::TsConstructSignatureTypeMember(member) = member {\n                validate_promise_construct_signature(&member)?;\n                saw_construct_signature = true;\n            }\n        }\n    }\n    if !saw_constructor_interface {","sourceCodeStart":869,"sourceCodeEnd":905,"githubUrl":"https://github.com/biomejs/biome/blob/3835945f0638c88162351318b7bc8b64c5f2fba7/xtask/codegen/src/generate_global_types/lower.rs#L869-L905","documentation":"The codegen requires the merged PromiseConstructor interface to have no extends clause, because validate_promise_methods checks members only against a fixed PROMISE_METHOD_SPECIFICATIONS list and an inherited member would be invisible to that check. If the interface extends another interface, lowering aborts with this error.","triggerScenarios":"Running generate_global_types when lib sources define `interface PromiseConstructor extends SomeBase { ... }`.","commonSituations":"TypeScript lib updates introducing a heritage clause on PromiseConstructor; vendor lib snapshots that merge extra interfaces via extends.","solutions":["Inline the inherited members into PromiseConstructor and remove the extends clause in the lib sources","Add support for extends clauses in the PromiseConstructor lowering path","Pin lib sources to a version where PromiseConstructor does not extend anything"],"exampleFix":"// before\ninterface PromiseConstructor extends PromiseExtras { ... }\n// after\ninterface PromiseConstructor { /* members of PromiseExtras inlined */ ... }","handlingStrategy":"validation","validationCode":"if (promiseConstructorDecl.extendsClause) {\n  throw new Error(\"Inline inherited members into interface PromiseConstructor before running codegen\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never add extends clauses to PromiseConstructor in snapshots","Inline heritage members manually when merging declarations","Review interface heritage in a pre-codegen lint over the snapshot"],"tags":["codegen","build-time","interfaces"],"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"}