Mutually-exclusive multi-return #3102
-
I'll open by acknowledging that this might not be supported, but it's something I'd like to know for certain. I'm working on a codebase that uses golang style Errors As Values, and I was hoping to get a little more tooling support from the language server. To speak more specifically, a function will either return Is there something clever I can do in the annotations to make this work the way I'm expecting? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This has been feature requested in multiple issues and discussion:
And from comments of maintainers #3086 (comment) ---@return =(true, some_type)
---@return =(false, string) (but not yet implemented of course) |
Beta Was this translation helpful? Give feedback.
This has been feature requested in multiple issues and discussion:
And from comments of maintainers #3086 (comment)
it is planned to support the following syntax:
(but not yet implemented of course)