我有一个typescript文件,将为浏览器编译为javasript。它看起来如下:
/// <reference path="typings/jquery/jquery.d.ts" />
/// <reference path="typings/jquery-backstretch/jquery-backstretch.d.ts" />
/// <reference path="typings/jquery-semantic/jquery-semantic.d.ts" />
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();
});
编译版本:
/// <reference path="typings/jquery/jquery.d.ts" />
/// <reference path="typings/jquery-backstretch/jquery-backstretch.d.ts" />
/// <reference path="typings/jquery-semantic/jquery-semantic.d.ts" />
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();
});
当我打电话给网站时,它会显示以下错误:
有什么问题?