Module: Braid::T
- Defined in:
- lib/braid/sorbet/fake_runtime.rb
Defined Under Namespace
Modules: Array, Hash, Sig
Classes: FakeType
Constant Summary
collapse
- FAKE_TYPE =
FakeType.instance
- Boolean =
FAKE_TYPE
Class Method Summary
collapse
Class Method Details
.cast(value, type) ⇒ Object
NOTICE: Like everything else in the fake Sorbet runtime (e.g., sig), these do not actually perform runtime checks. Currently, if you want a runtime check, you have to implement it yourself. We considered defining wrapper functions with different names to make this clearer, but then we’d lose the extra static checks that Sorbet performs on direct calls to T.cast and T.must.
33
34
35
|
# File 'lib/braid/sorbet/fake_runtime.rb', line 33
def self.cast(value, type)
value
end
|
.let(value, type) ⇒ Object
23
24
25
|
# File 'lib/braid/sorbet/fake_runtime.rb', line 23
def self.let(value, type)
value
end
|
.must(value) ⇒ Object
36
37
38
|
# File 'lib/braid/sorbet/fake_runtime.rb', line 36
def self.must(value)
value
end
|
.nilable(type) ⇒ Object
49
50
51
|
# File 'lib/braid/sorbet/fake_runtime.rb', line 49
def self.nilable(type)
FAKE_TYPE
end
|
.type_alias ⇒ Object
45
46
47
|
# File 'lib/braid/sorbet/fake_runtime.rb', line 45
def self.type_alias
FAKE_TYPE
end
|
.untyped ⇒ Object
52
53
54
|
# File 'lib/braid/sorbet/fake_runtime.rb', line 52
def self.untyped
FAKE_TYPE
end
|