javascript预加载程序能够在没有引用的情况下检测函数,jshint加载程序不会执行此任务
我有一个文件:greetings.jsjavascript预加载程序能够在没有引用的情况下检测函数,jshint加载程序不会执行此任务,javascript,jshint,Javascript,Jshint,我有一个文件:greetings.js function greetings () { return { hello: function () { return 'hello'; }, bye: function () { lostfunction.write ('this is function does not exists'); return 'bye'
function greetings () {
return {
hello: function () {
return 'hello';
},
bye: function () {
lostfunction.write ('this is function does not exists');
return 'bye';
}
};
}
module.exports = greetings;
在bye函数中有一个未定义的对象或函数:“lostfunction”,但Jshint不显示警告或错误;就在浏览器控制台中,我得到:
未捕获引用错误:未定义lostfunction
是否所有加载程序都无法显示此类错误