ts コンパイラの最新の開発バージョンを使用して以下のコードをコンパイルしようとしていますが、次のエラーが発生しています。
エラー TS2137: クラス test.CacheService はインターフェイス test.ICache を宣言していますが、実装していません:
これは、0.9.1.1 コンパイラを使用すると問題なく動作します。問題が何であるかを誰かが知っていますか?再度、感謝します
module test {
export interface ICache {
//indexer: [name: string]: any;
get<T>(key: string): T;
set(key: string, value: any);
}
export class CacheService implements ICache {
private _cache: any = {};
get<T>(key: string): T {
//if (!key) {
// var tmp: T;
// if ($.isArray(tmp))
return <T>this._cache[key];
}
set(key: string, value: any) {
this._cache[key] = value;
}
}
}