Community
Participate
Working Groups
Steps: 1. open server.js (in the orion client code) 2. notice socket.io has no type infos (the warning tells you so - which is correct) 3. type socketio. in code and activate content assist 4. notice a bunch of bogus 'node' entries, where I would expect none (sine there is no definition, nor a node_modules entry for it)
This is because Tern is guessing. There are no known completions for socketio. However, later in the file there is socketio.listen(), which is included in the forwards. In Tern.js line 774, if no completions are found and guessing is turned on, we call guessProperties. GuessProperties will see the forwarded 'listen' function and find a potential match from the Node index for tls.Server.prototype. We can either turn off the guessing for completions or accept that it might guess wrong. Would be nice to know the specific type we are getting compeltions for, rather than just the origin 'node'.
See related Bug 493103
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04002.html
Reopening