Re:Open-sourcing the Sorbet VS Code Extension
by cmer on Thursday January 06, 2022 @08:31PM
(#29833498)
Will Sorbet and this extension allow for autocomplete of non-Sorbet signed methods? Or does it only expose methods with a signature?
[ Parent
| on HN ]
Re:Open-sourcing the Sorbet VS Code Extension
by jez on Thursday January 06, 2022 @09:05PM
(#29833831)
If 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%...
Re:Open-sourcing the Sorbet VS Code Extension
by cassiogo on Thursday January 06, 2022 @09:47PM
(#29834147)
Even if I dont have signatures in my code, can I use it to get stdlib/gems signatures?
Re:Open-sourcing the Sorbet VS Code Extension
by univerio on Thursday January 06, 2022 @10:33PM
(#29834499)
stdlib rbis are shipped with Sorbet. A limited selection of gem RBIs are available at https://github.com/sorbet/sorbet-typed.