sig/plugins/compression.rbs in httpx-0.22.5 vs sig/plugins/compression.rbs in httpx-0.23.0

- old
+ new

@@ -1,9 +1,8 @@ module HTTPX module Plugins module Compression - type encodings_registry = Registry[Symbol, Class] type deflatable = _Reader | _ToS interface _Deflater def deflate: (deflatable, ?_Writer, ?chunk_size: Integer) -> _ToS @@ -14,15 +13,20 @@ def inflate: (string) -> String def initialize: (Integer | Float bytesize) -> untyped end + interface _Compressor + def deflater: () -> _Deflater + def inflater: (Integer | Float bytesize) -> _Inflater + end + def self.configure: (singleton(Session)) -> void interface _CompressionOptions def compression_threshold_size: () -> Integer? - def encodings: () -> encodings_registry? + def encodings: () -> Hash[String, _Compressor] end def self.extra_options: (Options) -> (Options & _CompressionOptions)