fix(model): 🏷️ Fix relationships model e tipi per istanze

This commit is contained in:
Maicol Battistini 2022-01-10 17:13:27 +01:00
parent db1c31f9a2
commit 5c98d91178
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import {
import {snakeCase} from 'lodash';
export interface InstantiableModel<T extends Model> {
new (): Model | T;
new (): (Model | T) & {[prop: string]: any};
}
export type IModel<T extends Model = Model> = InstanceType<InstantiableModel<T>>;
@ -14,8 +14,8 @@ export type IModel<T extends Model = Model> = InstanceType<InstantiableModel<T>>
* The base model for all models.
*/
export abstract class Model extends BaseModel {
jsonApiType: string = '';
[prop: string]: any;
public static relationships: string[] = [];
protected jsonApiType: string = '';
constructor() {
super();