marijnh/tern — pull request #449 by angelozerr (2014-12-15 02:35:02+00:00)
Title: Completion for object literal

This PR gives the capability to support completion for object literal for known type. This PR includes the update of requirejs plugin to support completion for config properties (baseUrl, paths, etc).

Here a screenshot of completion for requirejs config :

![requirejsconfig](https://cloud.githubusercontent.com/assets/1932211/5430231/0c76c272-840b-11e4-8a4c-b3f1fcd26398.png)

The basic idea is to attach to the node of object literal a new property expObjType (expected object type). So the node of object literal have objType and expObjType which comes from !type fn declaration.

expObjType is updated inside the 2 visitors which uses CallExpression.

The completion for object literal uses expObjType. expObjType could be use too to use for 'documentation' for instance or findTypeAt (to fill the type with documentation, url).

Note that it misses some requirejs config properties (tell me if you wish I fill it)