Skip to content

No output with --out when using import statement #1544

Closed
@felixSchl

Description

@felixSchl

This cost me quite a bit of time, so please enlighten me if this is anticipated behaviour and let's put a big note in the docs.

tsc --module commonjs --out app.js app.ts type checks correctly, however produces no output. In fact it does not produce output with --module amd either.

tsc --module commonjs app.ts type checks correctly and produces output, but I do not have control over the location of the output.

For reference, I am developing a node app.

Let's say my app looks like this:

/// <reference path="./typings/node/node.d.ts"/>
/// <reference path="./typings/lodash/lodash.d.ts"/>
import _     = require("lodash");
var x = "test";

and I used tsc --module commonjs --out app.js app.ts to compile, I would get no output at all

To get my output back, I would either need to drop the import statement or drop the --out argument.

This is happening on version 1.3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions