Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions lib/spoom/ext/prism_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,4 @@
# frozen_string_literal: true

module Spoom
module PrismTypes
# Ideally this would just be in a shim in `sorbet/rbi/shims/prism.rbi`, but that causes
# `bundle exec tapioca gem spoom` to fail. It Spoom's translator to rewrite the RBS signature comments into Sigs,
# which try to access the `Prism::AnyScopeNode` constant.
# Because shims aren't executed, no such constant exists at runtime, and the Sig raises a NameError.
#
# So instead, we define it here, where the translator can reify it into a real Sorbet `T.type_alias` at runtime.
#: type anyScopeNode = ::Prism::ClassNode | ::Prism::ModuleNode | ::Prism::SingletonClassNode
end
end
Loading