Within my typeorm entity, there is a column defined as:
@Column({
type: 'bigint',
nullable: true,
})
lockedTimestamp?: number;
In my nest.js code, I am trying to handle it like this:
if (...) {entity.lockedTimestamp = null;}
Issue: TypeScript strict mode is flagging that lockedTimestamp cannot be null. It must either be undefined or a number.
What could be the problem here? Have I correctly specified the column as nullable?
Would the database throw an error if I try to update it with undefined?