Skip to content

Regression v4, definition files import typescript files #40852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
VincentBailly opened this issue Sep 30, 2020 · 0 comments · Fixed by #40885
Closed

Regression v4, definition files import typescript files #40852

VincentBailly opened this issue Sep 30, 2020 · 0 comments · Fixed by #40885
Assignees
Labels
Bug A bug in TypeScript Domain: Declaration Emit The issue relates to the emission of d.ts files Fix Available A PR has been opened for this issue

Comments

@VincentBailly
Copy link
Member

VincentBailly commented Sep 30, 2020

In some situation TS v4 would create a declaration file which imports a TypeScript source file. This is an issue because we don't ship our TypeScript files to npm but only our .js and .d.ts file. So this makes our consumers fail to build.

TypeScript Version: 4.1.0-dev.20200930

Search Terms:
.d.ts
import

Code

See repo here: https://github.com/VincentBailly/TS-bug-repro

Expected behavior:

This is the behavior with latest TypeScript version ^3.0.0

$ cat packages/search-core-notification/lib/Store/NotificationStore.d.ts 
export declare const NotificationScenario: () => import("../API/NotificationAPIUtils").NotificationResponse;

Actual behavior:

Note that the file imported is a TS file and NOT a definition file.

 $ cat packages/search-core-notification/lib/Store/NotificationStore.d.ts 
export declare const NotificationScenario: () => import("search-core-notification/src/API/NotificationAPIUtils").NotificationResponse;
@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Sep 30, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.2.0 milestone Sep 30, 2020
@weswigham weswigham added Bug A bug in TypeScript Domain: Declaration Emit The issue relates to the emission of d.ts files and removed Needs Investigation This issue needs a team member to investigate its status. labels Oct 1, 2020
@typescript-bot typescript-bot added the Fix Available A PR has been opened for this issue label Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Declaration Emit The issue relates to the emission of d.ts files Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants