Closed danielwerg closed 4 years ago
Hmm, I see how that would happen: null
has an object
type, while false
is boolean
. That technically is a structure change...
The point is that the script doesn't check the types against our typings for the responses, but it only checks if they changed: it has no way to know that maintenance is supposed to be null | boolean
.
If we wanted to make it that way we would need to have a utility function for every method that can return whether a value corresponds to our interface: if it is still the same type we don't need to update anything, if it changed the types need to be updated manually in the source code, because it means we've done something wrong...
That's probably too much work for a simple outcome
Ok, I'll close the issue for now
<getStatus>.maintenance
value changed fromnull
tofalse
which caused "structureChange" function to returntrue
.https://github.com/danielwerg/r6api.js/commit/2ed937327bcb676c4158b8b903b9333af7c77c93 https://github.com/danielwerg/r6api.js/runs/1147076465