Skip to content

🐛 Duplicate export on exported const variable equal to exported function #996

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Prerequisites

Reproduction url

https://github.com/JoshuaKGoldberg/ts-api-utils/tree/150b52ca67b79c403c5bd8acf2d3ba92a49765ee

Reproduction access

  • I've made sure the reproduction is publicly accessible

Description of the issue

I have a few code pairs like this:

export function intersectionConstituents() {
  // ...
}

/** @deprecated use {@link intersectionConstituents}. */
export const intersectionTypeParts = intersectionConstituents;

Knip is reporting on those pairs:

Duplicate exports (3)
intersectionConstituents, intersectio...  src/types/utilities.ts
typeConstituents, typeParts               src/types/utilities.ts
unionConstituents, unionTypeParts         src/types/utilities.ts

I tried making a standalone reproduction but the bug didn't reproduce ☹. So I don't know what's specifically happening differently in ts-api-utils. But it's happening in JoshuaKGoldberg/ts-api-utils#713 on the latest knip@5.46.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions