forked from vikunja/frontend
Dominik Pschenitschni
96f5f00c07
We used declare which is the wrong use-case for this. See: https://www.typescriptlang.org/docs/handbook/2/classes.html#--strictpropertyinitialization
33 lines
525 B
TypeScript
33 lines
525 B
TypeScript
import AbstractModel from './abstractModel'
|
|
|
|
export interface IBackgroundImage extends AbstractModel {
|
|
id: number
|
|
url: string
|
|
thumb: string
|
|
info: {
|
|
author: string
|
|
authorName: string
|
|
}
|
|
blurHash: string
|
|
}
|
|
|
|
export default class BackgroundImageModel extends AbstractModel implements IBackgroundImage {
|
|
id!: number
|
|
url!: string
|
|
thumb!: string
|
|
info!: {
|
|
author: string
|
|
authorName: string
|
|
}
|
|
blurHash!: string
|
|
|
|
defaults() {
|
|
return {
|
|
id: 0,
|
|
url: '',
|
|
thumb: '',
|
|
info: {},
|
|
blurHash: '',
|
|
}
|
|
}
|
|
} |