Skip to content

bug(overlay): OverlayReference is no longer being exported in @angular/cdk @ 14 #25098

Closed
@lucavb

Description

@lucavb

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:

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions