#! /usr/bin/env ruby
# frozen_string_literal: true

require "sorbet-runtime"

unless ENV["ENFORCE_TYPECHECKING"] == "1"
  begin
    T::Configuration.default_checked_level = :never
    # Suppresses call validation errors
    T::Configuration.call_validation_error_handler = ->(*) {}
    # Suppresses errors caused by T.cast, T.let, T.must, etc.
    T::Configuration.inline_type_error_handler = ->(*) {}
    # Suppresses errors caused by incorrect parameter ordering
    T::Configuration.sig_validation_error_handler = ->(*) {}
  rescue
    # Need this rescue so that if another gem has
    # already set the checked level by the time we
    # get to it, we don't fail outright.
    nil
  end
end

require_relative "../lib/tapioca/internal"

Tapioca::Cli.start(ARGV)