Skip to content

Commit cf2bb87

Browse files
committed
Update JSON schema
1 parent 6ef2b83 commit cf2bb87

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

schema/decls.json

+15
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@
116116
},
117117
{
118118
"$ref": "members.json#/definitions/alias"
119+
},
120+
{
121+
"$ref": "#/definitions/alias"
122+
},
123+
{
124+
"$ref": "#/definitions/constant"
125+
},
126+
{
127+
"$ref": "#/definitions/class"
128+
},
129+
{
130+
"$ref": "#/definitions/module"
131+
},
132+
{
133+
"$ref": "#/definitions/interface"
119134
}
120135
]
121136
},

schema/members.json

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
},
3535
"location": {
3636
"$ref": "location.json"
37+
},
38+
"overload": {
39+
"type": "boolean"
3740
}
3841
},
3942
"required": ["member", "kind", "types", "comment", "annotations", "location"]

test/rbs/schema_test.rb

+13
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,17 @@ def foo: () -> Integer
262262

263263
assert_decl decl, :interface
264264
end
265+
266+
def test_nested
267+
decl, = RBS::Parser.parse_signature(<<EOF)
268+
module RBS
269+
VERSION: String
270+
271+
class Namespace
272+
end
273+
end
274+
EOF
275+
276+
assert_decl decl, :module
277+
end
265278
end

0 commit comments

Comments
 (0)