You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I turned on trace debugging and see that the completion from tern.js itself doesn't contain duplicate entries, nor do the completion suggest that the methods can have different expansions:
{
"start": 19,
"end": 23,
"isProperty": true,
"isObjectKey": false,
"completions": [
{
"name": "getData",
"type": "fn(type: string) -> string",
"doc": "Retrieves the data for a given type, or an empty string if data for that type does not exist or the data transfer contains no data.",
"url": "https:\/\/developer.mozilla.org\/en\/docs\/DragDrop\/Drag_Operations",
"origin": "browser"
},
{
"name": "getDate",
"type": "fn() -> number",
"doc": "Returns the day of the month for the specified date according to local time.",
"url": "https:\/\/developer.mozilla.org\/en-US\/docs\/JavaScript\/Reference\/Global_Objects\/Date\/getDate",
"origin": "ecma5"
},
{
"name": "getDay",
"type": "fn() -> number",
"doc": "Returns the day of the week for the specified date according to local time.",
"url": "https:\/\/developer.mozilla.org\/en-US\/docs\/JavaScript\/Reference\/Global_Objects\/Date\/getDay",
"origin": "ecma5"
}
]
}
This seems to be a bug?
The text was updated successfully, but these errors were encountered:
The expand function is done on client side and not by ternjs. The idea is to provide the full signatures of a method. Imagine that ternjs returns. A sample is
String#indexOf(elt: ?, from?: number)
You will have this completion:
with expand:
var a = "";
a.index // here Ctrl+Spcae shows indexOf, indexOf(char) and indexOf(char, from)
with no expand:
var a = "";
a.index // here Ctrl+Space shows indexOf, and indexOf(char, from)
@angelozerr Thanks for the reply. It seems you are saying that the behavior that I see in my example is not due to turning expansion on/off since the method signature doesn't have any ?optional parameters
Using tern.java 1.2.0 from http://oss.opensagres.fr/tern.repository/1.2.0/.
Per my understanding of https://github.com/angelozerr/tern.java/wiki/Tern-Advanced-Completion#expand-function the expand function preference gives multiple entries for the auto-completion. I turned this preference off, but it seems it is not respected.
I turned on trace debugging and see that the completion from tern.js itself doesn't contain duplicate entries, nor do the completion suggest that the methods can have different expansions:
This seems to be a bug?
The text was updated successfully, but these errors were encountered: