stdlib/json/0/json.rbs in rbs-1.6.2 vs stdlib/json/0/json.rbs in rbs-1.7.0.beta.1

- old
+ new

@@ -510,11 +510,11 @@ class Range[out Elem] # Deserializes JSON string by constructing new Range object with arguments `a` # serialized by `to_json`. # - def self.json_create: (Hash[String, String | [Elem, Elem, bool]] object) -> instance + def self.json_create: [A] (Hash[String, String | [A, A, bool]] object) -> Range[A] # Returns a hash, that will be turned into a JSON object and represent this # object. # def as_json: (*untyped) -> Hash[String, String | [Elem, Elem, bool]] @@ -563,11 +563,11 @@ class Set[A] # Import a JSON Marshalled object. # # method used for JSON marshalling support. # - def self.json_create: (Hash[String, String | Array[A]] object) -> instance + def self.json_create: [A] (Hash[String, String | Array[A]] object) -> Set[A] # Marshal the object to JSON. # # method used for JSON marshalling support. # @@ -580,10 +580,10 @@ class Struct[Elem] # Deserializes JSON string by constructing new Struct object with values `v` # serialized by `to_json`. # - def self.json_create: (Hash[String, String | Array[Elem]] object) -> instance + def self.json_create: [Elem] (Hash[String, String | Array[Elem]] object) -> Struct[Elem] # Returns a hash, that will be turned into a JSON object and represent this # object. # def as_json: (*untyped) -> Hash[String, String | Array[Elem]]