Skip to content

Tern & ECMAScript support

angelozerr edited this page Jan 24, 2015 · 12 revisions

tern supports :

After installing and converting your project as Tern Project (see Tern-Eclipse-IDE), open Project Properties, click on Tern / Modules item and select the ECMAScript tern module and the version :

Select ECMAScript Module

ECMAScript 5

ECMAScript 5 gives the capability to provide completion for Array :

ECMAScript Completion Array

In this sample, arr is an Array of number, the completion for elt item provides Number methods :

ECMAScript Completion ForEach Array

ECMAScript 6

ECMAScript 6 provides Promise object. If you select ECMAScript 6 module, Tern provides completion for this object :

ECMAScript6 Promise Completion

Tern is able to discover the type of the Promise value :

ECMAScript6 Promise Completion

Clone this wiki locally