Hacker News new | ask | show | jobs
by ihsw 3670 days ago
The .js files don't import the transpiled .ts files -- the .ts files are written to import other .ts files using relative paths.

A.ts importing B.ts would be `import * as A from "./B"`, where the transpiled A.js file would import from `./B.js` rather than the original A.ts file.

Furthermore you can mix JS into your compilation process and the TS compiler will* accommodate you by compiling your JS alongside your TS code.[1]

* TypeScript 1.8

[1] https://github.com/Microsoft/TypeScript/issues/4792