Closed
Description
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;