This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
[MDCObjerverFoundation]: Upgrade 14.0.2 to 14.2.2 causes "node_modules/@material/base/observer-foundation.d.ts:25:75 - error TS2344: Type 'AdaΒ #7727
Closed
Description
Bug report
I'm using pretty basic functions from Material, but after upgrading to 14.2.2 get:
Error: node_modules/@material/base/observer-foundation.d.ts:25:75 - error TS2344: Type 'Adapter' does not satisfy the constraint '{}'.
25 export declare class MDCObserverFoundation extends MDCFoundation {
node_modules/@material/base/observer-foundation.d.ts:25:44
25 export declare class MDCObserverFoundation extends MDCFoundation {
This type parameter might need an extends {} constraint.`
Expected Behavior
compilation without errors
Your Environment:
Software | Version(s) |
---|---|
Angular: 14.2.2 | |
CDK/Material: 14.2.2 | |
Browser(s): Chrome (latest updates) | |
Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 (all updates) |
Possible solution
Going from:
export declare class MDCObserverFoundation extends MDCFoundation {
to:
export declare class MDCObserverFoundation<Adapter extends {}> extends MDCFoundation {
in file node_modules/@material/base/observer-foundation.d.ts:25:75
seems to fix it.
Previously reported as angular/components#25657, but they said it was yours...