Sha256: b6c8b362599d5a05b3b0f961be5c278b40b5e6f727d46b2a4d9814d854f86c80

Contents?: true

Size: 408 Bytes

Versions: 1

Compression:

Stored size: 408 Bytes

Contents

# typed: strict

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

      sig { params(field_name: Symbol, field_type: Field::Type, 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

1 entries across 1 versions & 1 rubygems

Version Path
sorbet-schema-0.4.0 lib/typed/validations/type_mismatch_error.rb