Add the relationships to the type level.
This commit is contained in:
parent
0d2cfd3002
commit
195a421163
@ -1,4 +1,7 @@
|
||||
type Channel = {
|
||||
import type { Episode } from "@slovo/models/episode";
|
||||
import type { Image } from "@slobo/models/image";
|
||||
|
||||
export type Channel = {
|
||||
name: string,
|
||||
description: string,
|
||||
link: URL,
|
||||
@ -6,6 +9,8 @@ type Channel = {
|
||||
copyright: string,
|
||||
explicit: boolean,
|
||||
category: string,
|
||||
|
||||
episodes?: Set<Episode>,
|
||||
image?: Image
|
||||
};
|
||||
|
||||
export default Channel;
|
||||
|
@ -1,9 +1,12 @@
|
||||
type Episode = {
|
||||
import type { Image } from "@slovo/models/image";
|
||||
|
||||
export type Episode = {
|
||||
title: string,
|
||||
link: URL,
|
||||
duration: string,
|
||||
description: string,
|
||||
explicit: boolean
|
||||
explicit: boolean,
|
||||
|
||||
image?: Image,
|
||||
};
|
||||
|
||||
export default Episode;
|
||||
|
@ -1,8 +1,6 @@
|
||||
type Image = {
|
||||
export type Image = {
|
||||
url: URL,
|
||||
title: string,
|
||||
width: number,
|
||||
height: number,
|
||||
};
|
||||
|
||||
export default Image;
|
||||
|
10
app/src/models/user.ts
Normal file
10
app/src/models/user.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import type { Channel } from "@slovo/models/channel";
|
||||
|
||||
export type User = {
|
||||
email: string,
|
||||
name: string,
|
||||
password?: string,
|
||||
|
||||
channel?: Channel
|
||||
};
|
||||
|
@ -22,6 +22,9 @@
|
||||
// Some stricter flags (disabled by default)
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noPropertyAccessFromIndexSignature": false
|
||||
"noPropertyAccessFromIndexSignature": false,
|
||||
"paths": {
|
||||
"@slovo/*": [ "./src/*" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user