1
0
Fork 0

Type safety: make sure datetime properties of NexusData contain Date instances

This commit is contained in:
Krzysztof Sikorski 2021-11-11 20:28:45 +01:00
parent 74a696f725
commit 0da09d9efb
Signed by: krzysztof-sikorski
GPG Key ID: 4EB564BD08FE8476
1 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,9 @@ class NexusData {
}
set requestStartedAt(value) {
if (!(value instanceof Date)) {
value = new Date(value)
}
this._requestStartedAt = value
}
@ -51,6 +54,9 @@ class NexusData {
}
set responseCompletedAt(value) {
if (!(value instanceof Date)) {
value = new Date(value)
}
this._responseCompletedAt = value
}