Skip to content

Commit

Permalink
Allow to get interfaces without generating typescript files
Browse files Browse the repository at this point in the history
  • Loading branch information
Envek authored and skryukov committed Nov 19, 2024
1 parent aea764b commit 890138a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/typelizer/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ def initialize(config = Typelizer::Config)
def call(force: false)
return unless Typelizer.enabled?

read_serializers

interfaces = target_serializers.map(&:typelizer_interface).reject(&:empty?)
writer.call(interfaces, force: force)

interfaces
end

def interfaces
@interfaces ||= begin
read_serializers
target_serializers.map(&:typelizer_interface).reject(&:empty?)
end
end

private

def target_serializers
Expand Down

0 comments on commit 890138a

Please sign in to comment.