Sha256: 5e2aead4cad7729419a85091ecd0882d49183911c5fadb4063834f9b15198185

Contents?: true

Size: 616 Bytes

Versions: 148

Compression:

Stored size: 616 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"

  # 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

148 entries across 142 versions & 2 rubygems

Version Path
sorbet-runtime-0.5.11044 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11042 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11039 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11034 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11032 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11029 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11026 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11024 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11016 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11014 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11013 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11012 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11011 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11010 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11002 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11001 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.11000 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.10993 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.10991 lib/types/private/types/not_typed.rb
sorbet-runtime-0.5.10990 lib/types/private/types/not_typed.rb