brew/Library/Homebrew/extend/hash/deep_merge.rbi
Patrick Linnane 4513a43d53
Fix RuboCop failures.
Co-authored-by: Patrick Linnane <patrick@linnane.io>
Co-authored-by: Carlo Cabrera <github@carlo.cab>
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-07-14 19:12:38 +01:00

21 lines
720 B
Ruby

# typed: strict
# frozen_string_literal: true
class Hash
sig {
type_parameters(:K2).params(
other_hash: T::Hash[T.type_parameter(:K2), T.untyped],
block: T.nilable(T.proc.params(k: T.untyped, v1: T.untyped, v2: T.untyped).returns(T.untyped)),
).returns(T::Hash[T.any(Hash::K, T.type_parameter(:K2)), T.untyped])
}
def deep_merge(other_hash, &block); end
sig {
type_parameters(:K2).params(
other_hash: T::Hash[T.type_parameter(:K2), T.untyped],
block: T.nilable(T.proc.params(k: T.untyped, v1: T.untyped, v2: T.untyped).returns(T.untyped)),
).returns(T::Hash[T.any(Hash::K, T.type_parameter(:K2)), T.untyped])
}
def deep_merge!(other_hash, &block); end
end