How do i get access to classes in another .ts
file in TypeScript?
e.g.
app.ts
window.onload = () => {
/// <reference path="TilingEngine/SofRenderer.ts" >
var drawingTool = new SofRenderer();
};
TilingEngine/SofRenderer.ts
class SofRenderer {
}
Fails to compile, with the error:
Could not find symbol 'SofRenderer'.
Your reference comment should be at the top of your file and be self-closing. Like this:
///<reference path="TilingEngine/SofRenderer.ts" />
window.onload = () => {
var drawingTool = new SofRenderer();
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With