Skip to content

Commit

Permalink
update Struct.new
Browse files Browse the repository at this point in the history
  • Loading branch information
sampersand committed Nov 22, 2023
1 parent 8dbc310 commit 8f21e12
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/struct.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,8 @@ class Struct[Elem]
# Any.new(1, 2)
# # => #<struct Any foo=1, bar=2>
#
def self.new: [K < _StructClass[Elem]] (string? classname, *interned fields, ?keyword_init: boolish?) ?{ (K) -> void } -> K
| [K < _StructClass[Elem]] (Symbol field1, *interned fields, ?keyword_init: boolish?) ?{ (K) -> void } -> K

interface _StructClass[Elem]
def new: (*Elem fields, **Elem keyword_fields) -> instance
end
def self.new: (string? classname, *interned fields, ?keyword_init: boolish?) ?{ (singleton(Struct)) [self: singleton(Struct)] -> void } -> untyped
| (Symbol field1, *interned fields, ?keyword_init: boolish?) ?{ (singleton(Struct)) [self: singleton(Struct)] -> void } -> untyped

# <!--
# rdoc-file=struct.c
Expand Down

0 comments on commit 8f21e12

Please sign in to comment.