module T
def self.bind(value, type, checked: true)
If `checked` is true, raises an exception at runtime if the value
`T.bind` behaves like `T.cast` in that it is assumed to be true statically.
end
...
T.bind(self, NewBinding)
seconds = lambda do
Use like:
Useful for blocks that are captured and executed later with instance_exec.
Tells the type checker to treat `self` in the current block as `type`.
def self.bind(value, type, checked: true) return value unless checked Private::Casts.cast(value, type, cast_method: "T.bind") end