所以我有两个接口和一个类:
import IUpdate = require('IUpdate');
import ITransformer = require('ITransformer'); //Has no trouble with ITransformer
interface IRecognizer
{
startRecognize(transformerToTell: ITransformer):void;
}
export = Recognizer;
和
import IUpdateLoc = require('IUpdateLoc');
interface ITransformer
{
locationUpdate(update: IUpdateLoc):void;
}
export = ITransformer;
但
import ITransformer = require('ITransformer');
import IRecognizer = require('IRecognizer');
import IUpdateLoc = require('IUpdateLoc');
class RealUpdate implements IRecognizer
{
startRecognize(trans: ITransformer):void{
}
}
export = RealUpdate;
我得到“类型引用不能从我的RealUpdate类引用容器'ITransformer'。我不明白为什么它对IRecognizer没有问题但在RealUpdate中没有?
可能不相关: 模块类型是commonjs 我正在使用带有https://bitbucket.org/axmor/typecs/wiki/Home插件的Eclipse使用Typescript。