0

I have a file named Server.js that contains export class Program and <reference path='mscorlib.ts'/>. When I build it with

tsc -t ES5 Server.ts --module commonjs --out Server.js

the generated file contains only the compiled source of mscorlib.ts, but no single sign of Server.ts. I've expected that there would have been an module.exports = {Program: Program} directive besides those sources, though. What could be a source of the problem?

1 Answer 1

1

The --out flag only applies to input files that aren't external modules.

See also

Sign up to request clarification or add additional context in comments.

1 Comment

That moment when you understand that TS is not production ready and it's already in your code base.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.