TypeScript Version: 2.9.x
2.8.x works fine. It starts to break with TypeScript 2.9.x. It's not fixed by the latest build (typescript@next).
Search Terms:
import symbolic link lerna
Code
https://github.com/strongloop/loopback-next/blob/master/packages/core/src/keys.ts
keys.ts
import{Application,ControllerClass}from'./application';exportconstCONTROLLER_CLASS=BindingKey.create<ControllerClass>('controller.current.ctor',);Please note the ControllerClass is a type alias re-exported from another module @loopback/next which is symbolically linked to @loopback/core by lerna.
application.ts
import{Context,Binding,BindingScope,Constructor}from'@loopback/context';exporttypeControllerClass=Constructor<any>;Expected behavior:
TypeScript 2.8.x style:
keys.d.ts (emitted by tsc)
constCONTROLLER_CLASS: BindingKey<new(...args: any[])=>any>;
Or
import{Constructor}from'@loopback/context';constCONTROLLER_CLASS: BindingKey<Constructor<any>>;Actual behavior:
constCONTROLLER_CLASS: BindingKey<import("../../context/src/value-promise").Constructor<any>>;Please note the relative link is only valid at development time. Once it's published as a npm module, the import cannot be resolved.
Playground Link:
Related Issues:
loopbackio/loopback-next#1405
TypeScript Version: 2.9.x
2.8.x works fine. It starts to break with TypeScript 2.9.x. It's not fixed by the latest build (typescript@next).
Search Terms:
import symbolic link lerna
Code
https://github.com/strongloop/loopback-next/blob/master/packages/core/src/keys.ts
keys.ts
Please note the
ControllerClassis a type alias re-exported from another module@loopback/nextwhich is symbolically linked to@loopback/corebylerna.application.ts
Expected behavior:
TypeScript 2.8.x style:
keys.d.ts (emitted by tsc)
Or
Actual behavior:
Please note the relative link is only valid at development time. Once it's published as a npm module, the
importcannot be resolved.Playground Link:
Related Issues:
loopbackio/loopback-next#1405