Type safety: make sure datetime properties of NexusData contain Date instances
This commit is contained in:
parent
74a696f725
commit
0da09d9efb
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue