(ts, cm, pos, queryName, c)
| 249 | // Type queries |
| 250 | |
| 251 | function showContextInfo(ts, cm, pos, queryName, c) { |
| 252 | ts.request(cm, queryName, function(error, data) { |
| 253 | if (error) return showError(ts, cm, error); |
| 254 | if (ts.options.typeTip) { |
| 255 | var tip = ts.options.typeTip(data); |
| 256 | } else { |
| 257 | var tip = elt("span", null, elt("strong", null, data.type || "not found")); |
| 258 | if (data.doc) |
| 259 | tip.appendChild(document.createTextNode(" — " + data.doc)); |
| 260 | if (data.url) { |
| 261 | tip.appendChild(document.createTextNode(" ")); |
| 262 | var child = tip.appendChild(elt("a", null, "[docs]")); |
| 263 | child.href = data.url; |
| 264 | child.target = "_blank"; |
| 265 | } |
| 266 | } |
| 267 | tempTooltip(cm, tip); |
| 268 | if (c) c(); |
| 269 | }, pos); |
| 270 | } |
| 271 | |
| 272 | // Maintaining argument hints |
| 273 |
no test coverage detected