My Dreamforce '15 presentation which discusses how we can use TypeScript in Visualforce. The video is here; http://salesforce.vidyard.com/watch/XT20D_JUgU4jBe5SjHy_Rg
7. What is TypeScript?
“TypeScript is a typed superset of JavaScript that compiles to plain JavaScript”
“…a symantic subset of JavaScript; the sensical subset” – Anders Hejlsberg
Aimed at improving the development experience for JavaScript
8. What is TypeScript?
Strongly typed. Tools perform type inference.
Modules, Classes & Interfaces
4 primitives: string, number, boolean, any
TypeScriptLang.org
10. Joining the Dots
Represent metadata as classes in TypeScript
• We need tools to do this
We no longer write JavaScript
• TypeScript only now
TypeScript is compiled before deployment
• And thus type checked
12. Where Next?
Better flow for developers
• Create a grunt task
• Automatically generate d.ts files on metadata changes
Improved support of metadata
• Inner classes
• Namespace support
Integration with continuous integration tools
Whatever else you can imagine
13. 3 Simple Points
JavaScript is not aware of the Salesforce metadata
All the metadata is exposed via the Tooling and Standard APIs
We can make TypeScript aware of the Salesforce metadata