From 5ece64631d679efef008bda5306494193921272f Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:39:08 -0500 Subject: [PATCH] Typing fixes --- lib/ruby_lsp/ruby_lsp_rails/test_utils.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb b/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb index 9432a0f3..b227bb3a 100644 --- a/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb +++ b/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb @@ -5,6 +5,8 @@ module RubyLsp module Rails module TestUtils extend T::Sig + extend T::Helpers + include Minitest::Assertions # to prevent Sorbet complaining sig { params(server: RubyLsp::Server).returns(RubyLsp::Result) } def pop_result(server) @@ -19,6 +21,8 @@ def pop_result(server) T.cast(result, RubyLsp::Result) end + # TODO: write correct sig + sig { params(message_queue: T.untyped, type: T.untyped).returns(T.untyped) } def pop_log_notification(message_queue, type) log = message_queue.pop return log if log.params.type == type @@ -27,6 +31,8 @@ def pop_log_notification(message_queue, type) log end + # TODO: write correct sig + sig { params(outgoing_queue: T.untyped, block: T.untyped).returns(T.untyped) } def pop_message(outgoing_queue, &block) message = outgoing_queue.pop return message if block.call(message)