Microsoft is introducing a new JavaScript language service in Visual Studio 15. The service, codenamed Salsa, is designed to improve the existing JavaScript language and provide enhancements to JSX support, module support, and ES6/ES7 syntax coverage.
According to Microsoft, language services are meant to provide completion lists, signature help, syntax highlighting and other helpful features for programming languages inside a developer’s IDE. The previous language service was based on an execution model that introduced complexity and inconsistency, according to the company. The new language service uses the same static analysis found in TypeScript to remove complications and provide consistency.
(Related: Microsoft wants Bing to improve search results for programmers)
“By basing the new language service on static analysis, we hope to accomplish a number of goals,” wrote Bowden Kelly, program manager for VS Client, in a blog post. “First, static analysis provides a consistent experience for JavaScript across all Visual Studio setups by eliminating runtime bailouts. Second, JavaScript editing experiences can benefit from existing TypeScript definition to provide richer IntelliSense. Third, JavaScript inherits support for features from ES2015, ES2016 and beyond that currently exist in TypeScript. Finally, we can be more agile and add new features more often by unifying our codebases.”
Microsoft is currently working on improving the automatic type acquisition in Salsa in order to remove third-party dependency and provide a smoother end-to-end experience. In addition, the company will improve the JSDoc spec coverage to include @constructor and @typedef.
Salsa is available as a preview in Visual Studio “15” preview.