Sha256: 8a75133f2c9417684ac04f339943a287239c64c77647c7b451c6bd34a360f1d9

Contents?: true

Size: 648 Bytes

Versions: 166

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true
# typed: true

# A placeholder for when an untyped thing must provide a type.
# Raises an exception if it is ever used for validation.
class T::Private::Types::NotTyped < T::Types::Base
  ERROR_MESSAGE = "Validation is being done on a `NotTyped`. Please report this bug at https://github.com/sorbet/sorbet/issues"

  def build_type
    nil
  end

  # overrides Base
  def name
    "<NOT-TYPED>"
  end

  # overrides Base
  def valid?(obj)
    raise ERROR_MESSAGE
  end

  # overrides Base
  private def subtype_of_single?(other)
    raise ERROR_MESSAGE
  end

  INSTANCE = ::T::Private::Types::NotTyped.new.freeze
end

Version data entries

166 entries across 166 versions & 1 rubygems

Version Path
sorbet-runtime-0.5.11604 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11602 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11600 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11597 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11595 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11592 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11589 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11585 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11582 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11581 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11577 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11572 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11566 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11558 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11557 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11554 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11553 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11551 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11549 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11547 lib/types/private/types/not_typed.rb