Used for compilation in TypeScript 0.9.1.1 (implementation of methods omitted):
module MyNodule { export interface ILocalStorage { SupportsLocalStorage(): boolean; SaveData(id: string, obj: any): boolean; LoadData(id: string): any; } export class LocalStorage implements ILocalStorage { static SupportsLocalStorage(): boolean { return true; } static SaveData(id: string, obj: any): boolean { return true; } static LoadData(id: string): any { return {}; } }
}
In TypeScript 0.9.5, I get a compiler error "Class LocalStorage declares the ILocalStorage interface but does not implement it."
What do I need to change for it to compile again?
Note: The reason for using the interface in this context was: - to have documentation that the class implements - to check the compiler whether the interface is correctly implemented.
typescript
user1388173
source share