Sha256: 230f489a7ece297b7de936a5ec4e9ec0b75cfd0f57e6c16ca3367fe7cceffcba

Contents?: true

Size: 571 Bytes

Versions: 3

Compression:

Stored size: 571 Bytes

Contents

# typed: strict
# frozen_string_literal: true

require 'stream-chat/types'

module StreamChat
  extend T::Sig
  T::Configuration.default_checked_level = :never
  # For now we disable runtime type checks.
  # We will enable it with a major bump in the future,
  # but for now, let's just run a static type check.

  sig { params(sort: T.nilable(T::Hash[String, Integer])).returns(SortArray) }
  def self.get_sort_fields(sort)
    sort_fields = T.let([], SortArray)
    sort&.each do |k, v|
      sort_fields << { field: k, direction: v }
    end
    sort_fields
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stream-chat-ruby-2.22.1 lib/stream-chat/util.rb
stream-chat-ruby-2.22.0 lib/stream-chat/util.rb
stream-chat-ruby-2.21.0 lib/stream-chat/util.rb