Code: Improve IntelliSense generation

Remove duplicate type names for nullables
Add some missing primitive types
Fix Typescript comment generation
Reuse Regex instance
Add comments for JS constructor function

Fixes issues with #307