Closed soutaro closed 1 week ago
# @rbs () -> void # @rbs ... def foo = nil # => def foo: () -> void | ... # Having several overloads is supported with `@rbs` syntax. # @rbs () -> void # | ... def bar = nil # => def bar: () -> void | ... # `#:` syntax also allows `...` #: () -> void #: ... def baz = nil # => def baz: () -> void | ...
Note that we don't support writing | overloads with #: syntax. This is because #| is not shorter than #:.
|
#:
#|
See https://github.com/soutaro/rbs-inline/issues/9
Note that we don't support writing
|
overloads with#:
syntax. This is because#|
is not shorter than#:
.See https://github.com/soutaro/rbs-inline/issues/9