3 ms·
Will Sorbet and this extension allow for autocomplete of non-Sorbet signed methods? Or does it only expose methods with a signature?
by cmer 5y ago
Will Sorbet and this extension allow for autocomplete of non-Sorbet signed methods? Or does it only expose methods with a signature?
- jez 5y agoIf Sorbet knows the type of the receiver of the method call, it will suggest completion results, regardless of whether any of the suggestions themselves have sigs, or whether you're inside a method with a signature. But without any sigs, there aren't going to necessarily be as many opportunities for Sorbet to know the type of the receiver as there would be with sigs. Here's an example https://sorbet.run/#%23%20typed%3A%20true%0A%0Aclass%20A%0A%20%20def%20sample_method_without_sig%3B%20end%0Aend%0A%0AA.new.sam%0A%23%20%20%20%20%20%20%20%20%5E%20try%20completion%20here!%0A%0A%23%20T.unsafe%28%29%20throws%20away%20type%20information%0AT.unsafe%28A.new%29.sam%0A%23%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5E%20also%20try%20here https://sorbet.run/#%23%20typed%3A%20true%0A%0Aclass%20A%0A%...