mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 15:48:32 -04:00
Correctly type nullable columns
TypeORM columns with `nullable: true` can be `null` at runtime. This commit ensures that the types of the corresponding properties reflect that. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
16ed12bfd7
commit
b93f01fe57
6 changed files with 14 additions and 14 deletions
|
@ -26,7 +26,7 @@ export class MediaUpload {
|
|||
@ManyToOne((_) => Note, (note) => note.mediaUploads, {
|
||||
nullable: true,
|
||||
})
|
||||
note: Note;
|
||||
note: Note | null;
|
||||
|
||||
@ManyToOne((_) => User, (user) => user.mediaUploads, {
|
||||
nullable: false,
|
||||
|
@ -44,7 +44,7 @@ export class MediaUpload {
|
|||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
backendData: BackendData;
|
||||
backendData: BackendData | null;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue