ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

Problem with Object.assign function #160

Closed easyfrog closed 7 years ago

easyfrog commented 7 years ago

When I use Object.assign to mixin multiple prototypes (more then 1).

like this: Object.assign(myClass.prototype, firstClass.prototype, secondClass.prototype);

The problem is ternjs only could analyze the firstClass's function. and the secondClass 's functions cannot be shown in the completion list. So is it a bug ?

assignbug

marijnh commented 7 years ago

Attached patch defines the method to also copy properties from the 3rd and 4th args, if given. That's still not entirely correct, but should cover most cases.