🔎 Search Terms
"specifier", "relative path"
🕗 Version & Regression Information
⏯ Playground Link
https://github.com/xlianghang/ts-specifier-bug
💻 Code
//src/main.tsimport{PartialType}from'./utils';classCommon{}exportclassSubextendsPartialType(Common){id: string;}// src/utils/index.tsimport{MyType,MyReturnType}from'./type-helpers';exportfunctionPartialType<T>(classRef: MyType<T>){abstractclassPartialClassType{constructor(){}}returnPartialClassTypeasMyReturnType;}// src/utils/type-helpers.tsexporttypeMyReturnType={new(...args: any[]): any;};exportinterfaceMyType<T=any>extendsFunction{new(...args: any[]): T;}🙁 Actual behavior

The dist folder is not the root directory, so do not import from src
🙂 Expected behavior

Import from a relative path
Additional information about the issue
Compilation fails in the MacOS, but is expected to behave in the https://stackblitz.com/~/github.com/xlianghang/ts-specifier-bug
💻 MacOS 14.3,Apple M2 Max
🔎 Search Terms
"specifier", "relative path"
🕗 Version & Regression Information
package.jsonimportsfield #55015⏯ Playground Link
https://github.com/xlianghang/ts-specifier-bug
💻 Code
🙁 Actual behavior
The
distfolder is not the root directory, so do not import fromsrc🙂 Expected behavior
Import from a relative path
Additional information about the issue
Compilation fails in the MacOS, but is expected to behave in the https://stackblitz.com/~/github.com/xlianghang/ts-specifier-bug
💻 MacOS 14.3,Apple M2 Max