Stripe is building a Ruby typechecker
medium.com
medium.com
class A
sig(foo: TrueClass | FalseClass).returns(String)
def bar(foo)
foo.to_s
end
end
The T.any(…) syntax seems very … verbose, for Ruby at least. And Ruby doesn't have a true "boolean" class (it has TrueClass/FalseClass), so that would be riddled everywhere unless you created a boolean type yourself. Same for indifferent hashes, i.e. a hash with keys of type T.any(String, Symbol).