Skip to content

Function call changes in TypeScript 4.4 seem to be breaking detection of named exports #63

Closed
@BenSjoberg

Description

@BenSjoberg

Hi, I'm hoping this is the right place to post this! I just learned about this project when investigating an issue with named imports in NestJS.

TypeScript made a change to how certain function calls are compiled to CommonJS in version 4.4. Long story short, when you write export * from "./foo"; in TypeScript, in 4.3 and earlier it would write something like:

tslib_1.__exportStar(require("./foo"), exports);

But in 4.4 it's writing:

(0, tslib_1.__exportStar)(require("./foo"), exports);

I ran into this while investigating an issue I ran into when upgrading NestJS, and it seems others are experiencing the same problems with other packages.

Like I said, I'm not very familiar with this project, but is it possible that the parsing code could be updated to handle this new syntax? I expect this is going to affect more and more CommonJS projects written in TypeScript as they release new versions compiled with 4.4 or later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions