The angular team designed atscript. Have a look at their doc. It does contain runtime type checking and it looks like this:
var length = rtts.type(name.length, rtts.int);
https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit9...
var length = rtts.type(name.length, rtts.int);
https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit9...