2

I am trying to include one TypeScript class file, Mandelbrot.ts, inside of another file app.ts. After having tried the solution in this question, I cannot get it to work.

app.ts

/// <reference path="Mandelbrot.ts" />

window.onload = function() {
    var mandelbrot = new Mandelbrot("canvas");
};

Mandelbrot.ts (same folder as app.ts)

class Mandelbrot {
    ...
}

app.js (Compiled output)

/// <reference path="Mandelbrot.ts" />
window.onload = function () {
    var mandelbrot = new Mandelbrot("canvas");
};
//# sourceMappingURL=app.js.map

It appears as though the compiler ignored my reference request, as nothing works in the browser. There aren't any compiler errors or warnings. I am using the compiler which is part of Visual Studio 2013 Ultimate.

1 Answer 1

1

If you want files to get imported based on reference comments you need to compile with "--out"

Having said that I feel out is a bad idea : https://github.com/TypeStrong/atom-typescript/blob/master/docs/out.md you should look at requirejs or systemjs

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.