Sorbet confguration

From wikinotes
Revision as of 01:11, 29 July 2023 by Will (talk | contribs) (Created page with "= Locations = <blockquote> {| class="wikitable" |- | <code>sorbet/config</code> || config |- | <code>sorbet/rbi/shims/*.rbi</code> || add your own custom stubs |- |} </blockquote><!-- Locations --> = Shims = <blockquote> In addition to ruby tapioca, you can write your own shims for your code.<br> Simply add whatever methods you want sorbet to know about.<br> Optionally add sigs to them. </blockquote><!-- Shims --> = Disable sorbet-runtime = <blockquote> You may w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Locations

sorbet/config config
sorbet/rbi/shims/*.rbi add your own custom stubs

Shims

In addition to ruby tapioca, you can write your own shims for your code.

Simply add whatever methods you want sorbet to know about.
Optionally add sigs to them.

Disable sorbet-runtime

You may want to temporarily disable sorbet-runtime for an executable, environment etc.

require "sorbet-runtime"
T::Configuration.call_validation_error_handler = nil