cfO Closure Preso - Simple Test with Type Enforcement
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
js
README.md
build.xml
index-dev.html
index.html

README.md

cfo-typeenforce

cfO Closure Preso - Simple Test with Type Enforcement

Nothing to complicated going on here!

Check out our fantastic TestClass.js file. It contains two methods.

Method A Takes a number as a param

Method B Takes a string as a param

As you know, Javascript (much like the Honey Badger) don't care what you give it. Could be numbers or strings or whatever - it don't care.

YOU can make it care though!

Note our JSDoc comments - we are defining the types of these variables that are coming in.

Now, change the parameters in Application.js so we pass in a "3" instead of the number 3.

Finally, Run the build script, you will be warned about improper variable usage!