Work around issue https://github.com/marijnh/tern/issues/207 by calling Tern.findQueryExpr() and Infer.expressionType() as suggested by marijn. The problem with this fix is it requires a "full" text update with the parameter hint request. Suggested a possible solution in the issue.

The quality of the hints has been much improved and record type annotations can be hinted correctly.
This commit is contained in:
dloverin committed 2013-08-15 22:52:31 -04:00
1 parent d95544d504
commit 0c892a988f
4 files changed
+88 -49

No files matched your search

@@ -819,8 +819,8 @@ define(function (require, exports, module) {
});
it("should list function type", function () {
var start = { line: 36, ch: 0 },
middle = { line: 36, ch: 5 };
var start = { line: 37, ch: 0 },
middle = { line: 37, ch: 5 };
testDoc.replaceRange("funD(", start, start);
testEditor.setCursorPos(middle);
@@ -1199,8 +1199,7 @@ define(function (require, exports, module) {
});
});
// Tern issue #207. Tern can't parse its own function hint.
xit("should list parameter hint for record type annotation", function () {
it("should list parameter hint for record type annotation", function () {
var testPos = { line: 178, ch: 25 };
testEditor.setCursorPos(testPos);