Validates the Depth property against the MaxDepth and drops the key
when both are the same.
Since there is no arithmetic checks in TypeScript, we cannot check of Depth >= MaxDepth.
We have to rely on Depth === MaxDepth and be careful about not incrementing the
depth unnecessarily as that might make the entire check fail
Validates the Depth property against the MaxDepth and drops the key when both are the same.
Since there is no arithmetic checks in TypeScript, we cannot check of Depth >= MaxDepth. We have to rely on Depth === MaxDepth and be careful about not incrementing the depth unnecessarily as that might make the entire check fail