Closed
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
13.x
Description
The interface OverlayReference
can no longer be imported. This is somewhat unfortunate because the interface is being used as an argument for the .attach()
method of PositionStrategy
which is still being exported. The TypeScript compiler with strict
or noImplicitAny
refuses to build the application.
My guess is that this file needs to export the interface https://github.com/angular/components/blob/main/src/cdk/overlay/public-api.ts
Reproduction
Steps to reproduce:
- View this project. Try to import the
OverlayReference
.
Expected Behavior
Being able to import all required types and interfaces for already exposed interfaces.
Actual Behavior
The shipped index.d.ts specifies the following:
declare interface OverlayReference {
which means that TypeScript won't import the interface. That would require the export
keyword
Environment
- Angular: 14.0.2
- CDK/Material: 14.0.2
- Browser(s): None / cannot be build
- Operating System (e.g. Windows, macOS, Ubuntu): macOS