src/JSUtils/node/TernNodeDomain.js
function handlePrimePump(path) {
    var fileName = _getDenormalizedFilename(path);
    var fileInfo = createEmptyUpdate(fileName),
        request = buildRequest(fileInfo, "completions", {line: 0, ch: 0});

    try {
        ternServer.request(request, function (error, data) {
            // Post a message back to the main thread
            self.postMessage({type: MessageIds.TERN_PRIME_PUMP_MSG,
                path: _getNormalizedFilename(path)
                });
        });
    } catch (e) {
        _reportError(e, path);
    }
}
function handlePrimePump(path) {
    var fileName = _getDenormalizedFilename(path);
    var fileInfo = createEmptyUpdate(fileName),
        request = buildRequest(fileInfo, "completions", {line: 0, ch: 0});

    try {
        ternServer.request(request, function (error, data) {
            // Post a message back to the main thread
            self.postMessage({type: MessageIds.TERN_PRIME_PUMP_MSG,
                path: _getNormalizedFilename(path)
                });
        });
    } catch (e) {
        _reportError(e, path);
    }
}
function handlePrimePump ( path ) { var fileName = _getDenormalizedFilename ( path ) ; var fileInfo = createEmptyUpdate ( fileName ) , request = buildRequest ( fileInfo , "completions" , { line : 0 , ch : 0 } ) ; try { ternServer . request ( request , function ( error , data ) { // Post a message back to the main thread self . postMessage ( { type : MessageIds . TERN_PRIME_PUMP_MSG , path : _getNormalizedFilename ( path ) } ) ; } ) ; } catch ( e ) { _reportError ( e , path ) ; } }
Make a completions request to tern to force tern to resolve files
and create a fast first lookup for the user.
@param {string} path     - the path of the file
Make a completions request to tern to force tern to resolve files and create a fast first lookup for the user .