kungfooman / RuntimeTypeInspector.js

Checking JSDoc types at runtime for high-quality types - Trust is good, control is better.
MIT License
8 stars 0 forks source link

Allow configurable depth of recursive validation #115

Closed kungfooman closed 6 months ago

kungfooman commented 6 months ago

I had an issue before with circular validation: #43

The "solution" worked and still works, but for more complex scenarious it's too strict.

Current idea is to add a "depth" argument to every validation function and if it e.g. exceeds 20 validation calls, a specific message can be generated, instead of simply return false.