Skip to content

Commit

Permalink
Merge pull request #67 from block/myron/update-sigs
Browse files Browse the repository at this point in the history
Update type signatures to match latest RBS.
  • Loading branch information
myronmarston authored Dec 27, 2024
2 parents f5d6e11 + 86c3e3f commit 08d2586
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions elasticgraph-graphql/sig/elastic_graph/time.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Work around for https://github.com/ruby/rbs/issues/2205.
class Time
def iso8601: (?Integer fraction_digits) -> String | ...
end
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def scalar_type(name, &block)
def deleted_type(name)
@state.register_deleted_type(
name,
defined_at: caller_locations(1, 1).first, # : ::Thread::Backtrace::Location
defined_at: caller_locations(1, 1).to_a.first, # : ::Thread::Backtrace::Location
defined_via: %(schema.deleted_type "#{name}")
)
nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def renamed_from(old_name)
parent_type.name,
from: old_name,
to: name,
defined_at: caller_locations(1, 1).first, # : ::Thread::Backtrace::Location
defined_at: caller_locations(1, 1).to_a.first, # : ::Thread::Backtrace::Location
defined_via: %(field.renamed_from "#{old_name}")
)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def deleted_field(field_name)
schema_def_state.register_deleted_field(
name,
field_name,
defined_at: caller_locations(2, 1).first, # : ::Thread::Backtrace::Location
defined_at: caller_locations(2, 1).to_a.first, # : ::Thread::Backtrace::Location
defined_via: %(type.deleted_field "#{field_name}")
)
end
Expand All @@ -263,7 +263,7 @@ def renamed_from(old_name)
schema_def_state.register_renamed_type(
name,
from: old_name,
defined_at: caller_locations(2, 1).first, # : ::Thread::Backtrace::Location
defined_at: caller_locations(2, 1).to_a.first, # : ::Thread::Backtrace::Location
defined_via: %(type.renamed_from "#{old_name}")
)
end
Expand Down

0 comments on commit 08d2586

Please sign in to comment.