尝试在类或模块中使用 jquery 时出现错误:
/// <reference path="../jquery.d.ts" />
element: jQuery; // all is good
elementou: $; // all is fine
class buggers{
private element: jQuery; // The name jQuery does not exist in the current scope
private elementou: $; // The name $ does not exist in the current scope
}
module something {
class buggers{
private element: jQuery; // The name jQuery does not exist in the current scope
private elementou: $; // The name $ does not exist in the current scope
}
}
我不知道如何解决这个问题。