livecheck: update types to allow nested JSON hashes
This commit is contained in:
parent
c4fe6f2c29
commit
d993a8e04d
@ -173,7 +173,7 @@ class Livecheck
|
||||
url: T.any(String, Symbol),
|
||||
homebrew_curl: T.nilable(T::Boolean),
|
||||
post_form: T.nilable(T::Hash[Symbol, String]),
|
||||
post_json: T.nilable(T::Hash[Symbol, String]),
|
||||
post_json: T.nilable(T::Hash[Symbol, T.anything]),
|
||||
).returns(T.nilable(T.any(String, Symbol)))
|
||||
}
|
||||
def url(url = T.unsafe(nil), homebrew_curl: nil, post_form: nil, post_json: nil)
|
||||
|
@ -16,7 +16,7 @@ module Homebrew
|
||||
prop :post_form, T.nilable(T::Hash[Symbol, String])
|
||||
|
||||
# JSON data to use when making a `POST` request.
|
||||
prop :post_json, T.nilable(T::Hash[Symbol, String])
|
||||
prop :post_json, T.nilable(T::Hash[Symbol, T.anything])
|
||||
|
||||
# Returns a `Hash` of options that are provided as arguments to `url`.
|
||||
sig { returns(T::Hash[Symbol, T.untyped]) }
|
||||
|
@ -174,7 +174,7 @@ module Homebrew
|
||||
sig {
|
||||
params(
|
||||
post_form: T.nilable(T::Hash[Symbol, String]),
|
||||
post_json: T.nilable(T::Hash[Symbol, String]),
|
||||
post_json: T.nilable(T::Hash[Symbol, T.anything]),
|
||||
).returns(T::Array[String])
|
||||
}
|
||||
def self.post_args(post_form: nil, post_json: nil)
|
||||
|
Loading…
x
Reference in New Issue
Block a user