Argument of type 'string' is not assignable to parameter of type 'keyof T'. Type 'string' is not assignable to type 'never'.
interface ModelAttributes<T extends object> {
get<K extends keyof T>(key: K): T[K];
set(update: T): void;
getAll(): T;
}
fetch(): void {
const id = this.get('id'); here where i get the error
if (typeof id !== 'number') {
throw new Error('cannot fetch without an id');
}