function getJumptoDef(fileInfo, offset) {
    var request = buildRequest(fileInfo, "definition", offset);
    // request.query.typeOnly = true;       // FIXME: tern doesn't work exactly right yet.

    try {
        ternServer.request(request, function (error, data) {
            if (error) {
                _log("Error returned from Tern 'definition' request: " + error);
                self.postMessage({type: MessageIds.TERN_JUMPTODEF_MSG, file: fileInfo.name, offset: offset});
                return;
            }
            var response = {
                type: MessageIds.TERN_JUMPTODEF_MSG,
                file: _getNormalizedFilename(fileInfo.name),
                resultFile: data.file,
                offset: offset,
                start: data.start,
                end: data.end
            };

            request = buildRequest(fileInfo, "type", offset);
            // See if we can tell if the reference is to a Function type
            ternServer.request(request, function (error, data) {
                if (!error) {
                    response.isFunction = data.type.length > 2 && data.type.substring(0, 2) === "fn";
                }

                // Post a message back to the main thread with the definition
                self.postMessage(response);
            });

        });
    } catch (e) {
        _reportError(e, fileInfo.name);
    }
}
Get definition location
@param {{type: string, name: string, offsetLines: number, text: string}} fileInfo
- type of update, name of file, and the text of the update.
For "full" updates, the whole text of the file is present. For "part" updates,
the changed portion of the text. For "empty" updates, the file has not been modified
and the text is empty.
@param {{line: number, ch: number}} offset - the offset into the
file for cursor