Open Harper04 opened 6 years ago
The types definition seems to be correct:
export default class Model { static readsPerSecond: number; static writesPerSecond: number; static all<T extends Model>(this: { new (): T; }): Promise<T[]>; static clear<T extends Model>(): Promise<number>; static create<T extends Model>(this: { new (): T; }, data: any): Promise<T>; static find<T extends Model>(this: { new (): T; }, id: string): Promise<T>; static remove<T extends Model>(id: string): Promise<boolean>; ... }
But for a simple class:
export default class Measurement extends Model { @field channel: string @field timestamp: number = new Date().getTime() @field temperature: number }
i only get the static variables...
maybe just a typescript bug after all; if you type it typescript is able to identify the method
The types definition seems to be correct:
But for a simple class:
i only get the static variables...