我是打字稿的新手,需要js。我已经看到了几种在打字稿中导入模块的方法。但我不清楚下面的代码在做什么。什么是导入打字稿中的模块的方法,以及require js在模块加载中的作用
1./// <reference path="foo.ts" />
2.import {utils} from "./util";
3.require(["bar"],function(bar){
//use module here
});
4.define(["bar"],function(bar){
//use module here
});
5.requirejs(["bar"],function(bar){
//use module here
});
它们是如何相互区别的。任何人请帮助。