big changes; we have a good TS config now
This commit is contained in:
parent
cbbaf54b33
commit
4497991344
54 changed files with 750 additions and 671 deletions
|
|
@ -1,17 +1,10 @@
|
|||
import { MediaTypeModel } from './MediaTypeModel';
|
||||
import { mediaDbTag, migrateObject } from '../utils/Utils';
|
||||
import { MediaType } from '../utils/MediaType';
|
||||
import { mediaDbTag, migrateObject, type ModelToData } from '../utils/Utils';
|
||||
import { MediaTypeModel } from './MediaTypeModel';
|
||||
|
||||
export type WikiData = ModelToData<WikiModel>;
|
||||
|
||||
export class WikiModel extends MediaTypeModel {
|
||||
type: string;
|
||||
subType: string;
|
||||
title: string;
|
||||
englishTitle: string;
|
||||
year: string;
|
||||
dataSource: string;
|
||||
url: string;
|
||||
id: string;
|
||||
|
||||
wikiUrl: string;
|
||||
lastUpdated: string;
|
||||
length: number;
|
||||
|
|
@ -19,13 +12,13 @@ export class WikiModel extends MediaTypeModel {
|
|||
|
||||
userData: Record<string, unknown>;
|
||||
|
||||
constructor(obj: any = {}) {
|
||||
constructor(obj: WikiData) {
|
||||
super();
|
||||
|
||||
this.wikiUrl = undefined;
|
||||
this.lastUpdated = undefined;
|
||||
this.length = undefined;
|
||||
this.article = undefined;
|
||||
this.wikiUrl = '';
|
||||
this.lastUpdated = '';
|
||||
this.length = 0;
|
||||
this.article = '';
|
||||
this.userData = {};
|
||||
|
||||
migrateObject(this, obj, this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue