Converting your JSDoc to runtime type assertions!

Put in typed JavaScript

Get type-asserting JavaScript out

First demonstration of RuntimeTypeInspector.js in combination with the PlayCanvas Examples viewer:

If you enter code in Monaco or F12/DevTools like this:

        new pc.Vec3("this", "should", "warn");

It warns like:


And in console:


The signal/noise ratio is still quite high to find "real" issues in the engine, but I hope we can get there with some PR's improving some type definitions here and there. Ideal case would be running every example with only a few errors here and there, but not in the thousands.

RuntimeTypeInspector.js - your personal type-checking assistant 🕵️🐞🐛

RuntimeTypeInspector.js alongside JSDoc is a powerful tool which works in tandem with Babel.js and TypeScript to generate type-asserting JavaScript files. Assertion code is injected into debug builds to perform runtime type checking of each function and method at runtime - a step which is required beyond pure static typing to help emerge the Incident Management Lifecycle.

The Incident Management Lifecycle is:

RuntimeTypeInspector.js is supporting Identify and Respond of the IML.

Why is this technology critical?

This technology is critical because it provides developers with an organized method to ensure type safety with runtime type issue reports while improving code organization, type safety and documentation - making it easier for other developers to understand the code and enforce good coding standards.

RuntimeTypeInspector.js assists the debugging process, since it has a clear definition of what each function expects while issuing warnings, which can act as breakpoints in your source code (as shown in the example debugging session in my showcase video). Finally, good JSDoc can make the entire code base more maintainable, since it's easier for developers to find the specific parts of the code they need to change quickly and easily.

Watch our Example Usage Videos!

If you want to see how our product works, take a look at the videos we have prepared. They show you exactly how to use our product with ease.

Presentation hunting down a NaN bug in the PlayCanvas engine:

hunting down NaN bug in PlayCanvas

Another demonstration fixing NaN bugs in the PlayCanvas Volumetric Video project:

volumetric video bug fixing


npm install runtime-type-inspector