Typescript root imports

Hi everyone,
i have a problem with the typescript compilers not recognizing root imports, like this :
import foo from '/imports/foo'
I must replace them with import foo from '../../../../../imports/foo' which is a PITA.
Any way to tell the compiler where to find root imports ?

You may want to open a bug report on it. Typescript support seems to be lacking in general compared to the ecmascript

Actually, after some googling it seems to be impossible to do with Typescript.
One way to do it would be to put common code in a npm module and to require it from there.
Requiring from “/imports” (or other absolute physical path) seems not a so good idea after all.

I think it is still a good idea. Ecmascript allows for it. And eslint can have a custom resolver to allow it.

@vjau: Have you found a solution for this? There seems to be some more configuration options for typescript by now, but I still cannot figure out if/how absolute paths can be resolved.

I have recently given up on Typescript.
For me it introduces more problems than it solves.