src/JSUtils/ScopeManager.js
function updateTernFile(document) {
            var path  = document.file.fullPath;

            _postMessageByPass({
                type       : MessageIds.TERN_UPDATE_FILE_MSG,
                path       : path,
                text       : getTextFromDocument(document)
            });

            return addPendingRequest(path, OFFSET_ZERO, MessageIds.TERN_UPDATE_FILE_MSG);
        }
function updateTernFile(document) {
            var path  = document.file.fullPath;

            _postMessageByPass({
                type       : MessageIds.TERN_UPDATE_FILE_MSG,
                path       : path,
                text       : getTextFromDocument(document)
            });

            return addPendingRequest(path, OFFSET_ZERO, MessageIds.TERN_UPDATE_FILE_MSG);
        }
function updateTernFile ( document ) { var path = document . file . fullPath ; _postMessageByPass ( { type : MessageIds . TERN_UPDATE_FILE_MSG , path : path , text : getTextFromDocument ( document ) } ) ; return addPendingRequest ( path , OFFSET_ZERO , MessageIds . TERN_UPDATE_FILE_MSG ) ; }
Update tern with the new contents of a given file.

@param {Document} document - the document to update
@return {jQuery.Promise} - the promise for the request
Update tern with the new contents of a given file .