Actionscript 3 was very good for this. I haven't done Flash development in a couple years, but i've been writing reams of Javascript (mostly backend). While I absolutely enjoy writing JS, I do miss the ability to declare types for methods, variables and parameters, which is incredibly helpful - especially as a project grows.
My IDE (phpStorm) helps quite a bit with this, currently - provided I document everything well - but I wouldn't mind having a compiler to smack me in the face when things are wrong.
My IDE (phpStorm) helps quite a bit with this, currently - provided I document everything well - but I wouldn't mind having a compiler to smack me in the face when things are wrong.