types(GuildScheduledEvent#scheduledStartAt): should be nullish (#8111)

This commit is contained in:
Tyler Resch
2022-06-24 04:42:39 -04:00
committed by GitHub
parent 0ffbef506a
commit 65dc8d677e
2 changed files with 4 additions and 3 deletions

View File

@@ -193,11 +193,12 @@ class GuildScheduledEvent extends Base {
/** /**
* The time the guild scheduled event will start at * The time the guild scheduled event will start at
* @type {Date} * <info>This can be potentially `null` only when it's an {@link AuditLogEntryTarget}</info>
* @type {?Date}
* @readonly * @readonly
*/ */
get scheduledStartAt() { get scheduledStartAt() {
return new Date(this.scheduledStartTimestamp); return this.scheduledStartTimestamp && new Date(this.scheduledStartTimestamp);
} }
/** /**

View File

@@ -1368,7 +1368,7 @@ export class GuildScheduledEvent<S extends GuildScheduledEventStatus = GuildSche
public creator: User | null; public creator: User | null;
public get createdTimestamp(): number; public get createdTimestamp(): number;
public get createdAt(): Date; public get createdAt(): Date;
public get scheduledStartAt(): Date; public get scheduledStartAt(): Date | null;
public get scheduledEndAt(): Date | null; public get scheduledEndAt(): Date | null;
public get channel(): VoiceChannel | StageChannel | null; public get channel(): VoiceChannel | StageChannel | null;
public get guild(): Guild | null; public get guild(): Guild | null;