Tern: Practical Type Inference for JavaScript Editing
Marijn Haverbeke


Abstract

One useful application of static program analysis is editor assistance. For static languages, features like autocompletion, finding definitions, and hinting function argments are widely used. It’d be nice to have them for dynamic languages. Tern implements a type inference engine for JavaScript. It can be plugged into various editors to provide language-aware integration. To be able to do this in near real-time, it uses an optimized form of data-flow analysis. The analysis is far from sound, but immensely helpful regardless.

Bio

Independent open source critter. Author of Eloquent JavaScript, CodeMirror, Tern.