From 2926c67e4458c0210e878400f40752554576415c Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:23:03 -0500 Subject: [PATCH] Declare type in initializer for `RubyIndexer::Enhancement` This will allow us to remove the shim from addons which use Sorbet, such as ruby-lsp-rails. --- lib/ruby_indexer/lib/ruby_indexer/enhancement.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb b/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb index 2d4fef3f7..0b813cb93 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb @@ -33,7 +33,7 @@ def clear sig { params(listener: DeclarationListener).void } def initialize(listener) - @listener = listener + @listener = T.let(listener, RubyIndexer::DeclarationListener) end # The `on_extend` indexing enhancement is invoked whenever an extend is encountered in the code. It can be used to