typed-javascript
Simple dynamic type checking for JavaScript. Runs in Node.js and in browser, and can be set off for production.
Include in Node.js:
var T = ;
Include in browser
See example.js for additional examples and typed.js for the source.
// Define two simple typesT; T; // Test type using in a normal JavaScript functionvar { // Ensure type person = T; console;}; // Test types automaticallyvar test2 = T; ;;