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:
David Mehren 2021-04-29 16:54:57 +02:00
parent 16ed12bfd7
commit b93f01fe57
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
6 changed files with 14 additions and 14 deletions

View file

@ -36,7 +36,7 @@ export class Note {
unique: true,
nullable: true,
})
alias?: string;
alias: string | null;
@OneToMany(
(_) => NoteGroupPermission,
(groupPermission) => groupPermission.note,
@ -70,11 +70,11 @@ export class Note {
@Column({
nullable: true,
})
description?: string;
description: string | null;
@Column({
nullable: true,
})
title?: string;
title: string | null;
@ManyToMany((_) => Tag, (tag) => tag.notes, { eager: true, cascade: true })
@JoinTable()