I have a typescript file that will compile in javasript for the browser. It looks like this:
import {Validator} from "classes/validator";
var main = () => {
$(".ui.dropdown").dropdown();
$(".left-half").backstretch(["../images/lotus.jpg"]);
const val = new Validator();
val.foo();
};
$(document)
.ready(() => {
main();
});
Compiled Version:
import {Validator} from "classes/validator";
var main = () => {
$(".ui.dropdown").dropdown();
$(".left-half").backstretch(["../images/lotus.jpg"]);
const val = new Validator();
val.foo();
};
$(document)
.ready(() => {
main();
});
When I called up the website, it shows me the following error:

What's wrong?
source
share