Sha256: 07a95bc53fc804ee2e91bee98cb5a5eb6d778375e38ef0d7d42ea7282c6f0362

Contents?: true

Size: 411 Bytes

Versions: 11

Compression:

Stored size: 411 Bytes

Contents

# typed: strict

module Typed
  module Validations
    class TypeMismatchError < ValidationError
      extend T::Sig

      sig { params(field_name: Symbol, field_type: T::Types::Base, given_type: T::Class[T.anything]).void }
      def initialize(field_name:, field_type:, given_type:)
        super("Invalid type given to #{field_name}. Expected #{field_type}, got #{given_type}.")
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sorbet-schema-0.9.2 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.9.1 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.9.0 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.8.0 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.7.2 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.7.1 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.7.0 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.6.0 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.5.1 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.4.2 lib/typed/validations/type_mismatch_error.rb
sorbet-schema-0.4.1 lib/typed/validations/type_mismatch_error.rb