Skip to content

Commit 90d31cf

Browse files
authored
Correct ReScript bindings for signature details (#1046)
* Correct ReScript bindings for signature details * Add changelog entries
1 parent 61e2709 commit 90d31cf

9 files changed

+31
-19
lines changed

tools/CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@
1212
1313
## master
1414

15+
## 0.6.6
16+
17+
### :bug: Bug Fix
18+
19+
- Correct ReScript bindings for signature details. https://github.com/rescript-lang/rescript-vscode/pull/1046
20+
21+
## 0.6.5
22+
23+
#### :rocket: New Feature
24+
25+
- Add additional signature information to doc json. https://github.com/rescript-lang/rescript-vscode/pull/1043
26+
1527
## 0.6.4
1628

1729
#### :rocket: New Feature

tools/npm/Tools_Docgen.res

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type signatureDetais = {
3131
type detail =
3232
| @as("record") Record({items: array<field>})
3333
| @as("variant") Variant({items: array<constructor>})
34-
| @as("alias") Signature(signatureDetais)
34+
| @as("alias") Signature({details:signatureDetais})
3535

3636
type source = {
3737
filepath: string,

tools/npm/Tools_Docgen.resi

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type signatureDetais = {
3131
type detail =
3232
| @as("record") Record({items: array<field>})
3333
| @as("variant") Variant({items: array<constructor>})
34-
| @as("signature") Signature(signatureDetais)
34+
| @as("signature") Signature({details:signatureDetais})
3535

3636
type source = {
3737
filepath: string,

tools/src/tools.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ let stringifyDetail ?(indentation = 0) (detail : docItemDetail) =
176176
stringifyObject ~startOnNewline:true ~indentation
177177
[
178178
("kind", Some (wrapInQuotes "signature"));
179-
( "items",
179+
( "details",
180180
Some
181181
(stringifyObject ~startOnNewline:false ~indentation
182182
[

tools/tests/src/expected/DocExtraction2.res.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"detail":
3535
{
3636
"kind": "signature",
37-
"items": {
37+
"details": {
3838
"parameters": [{
3939
"path": "unit"
4040
}],
@@ -81,7 +81,7 @@
8181
"detail":
8282
{
8383
"kind": "signature",
84-
"items": {
84+
"details": {
8585
"parameters": [{
8686
"path": "unit"
8787
}],

tools/tests/src/expected/DocExtraction2.resi.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"detail":
3535
{
3636
"kind": "signature",
37-
"items": {
37+
"details": {
3838
"parameters": [{
3939
"path": "unit"
4040
}],
@@ -81,7 +81,7 @@
8181
"detail":
8282
{
8383
"kind": "signature",
84-
"items": {
84+
"details": {
8585
"parameters": [{
8686
"path": "unit"
8787
}],

tools/tests/src/expected/DocExtractionRes.res.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"detail":
5050
{
5151
"kind": "signature",
52-
"items": {
52+
"details": {
5353
"parameters": [{
5454
"path": "string"
5555
}],
@@ -73,7 +73,7 @@
7373
"detail":
7474
{
7575
"kind": "signature",
76-
"items": {
76+
"details": {
7777
"parameters": [{
7878
"path": "t"
7979
}],
@@ -97,7 +97,7 @@
9797
"detail":
9898
{
9999
"kind": "signature",
100-
"items": {
100+
"details": {
101101
"returnType": {
102102
"path": "int"
103103
}
@@ -221,7 +221,7 @@
221221
"detail":
222222
{
223223
"kind": "signature",
224-
"items": {
224+
"details": {
225225
"parameters": [{
226226
"path": "SomeInnerModule.status"
227227
}],
@@ -317,7 +317,7 @@
317317
"detail":
318318
{
319319
"kind": "signature",
320-
"items": {
320+
"details": {
321321
"parameters": [{
322322
"path": "unit"
323323
}],
@@ -365,7 +365,7 @@
365365
"detail":
366366
{
367367
"kind": "signature",
368-
"items": {
368+
"details": {
369369
"parameters": [{
370370
"path": "t"
371371
}],
@@ -414,7 +414,7 @@
414414
"detail":
415415
{
416416
"kind": "signature",
417-
"items": {
417+
"details": {
418418
"parameters": [{
419419
"path": "int"
420420
}],
@@ -450,7 +450,7 @@
450450
"detail":
451451
{
452452
"kind": "signature",
453-
"items": {
453+
"details": {
454454
"returnType": {
455455
"path": "int"
456456
}
@@ -484,7 +484,7 @@
484484
"detail":
485485
{
486486
"kind": "signature",
487-
"items": {
487+
"details": {
488488
"returnType": {
489489
"path": "int"
490490
}
@@ -529,7 +529,7 @@
529529
"detail":
530530
{
531531
"kind": "signature",
532-
"items": {
532+
"details": {
533533
"returnType": {
534534
"path": "int"
535535
}

tools/tests/src/expected/ModC.res.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"detail":
3434
{
3535
"kind": "signature",
36-
"items": {
36+
"details": {
3737
"returnType": {
3838
"path": "string"
3939
}

tools/tests/src/expected/ModC.resi.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"detail":
3434
{
3535
"kind": "signature",
36-
"items": {
36+
"details": {
3737
"returnType": {
3838
"path": "string"
3939
}

0 commit comments

Comments
 (0)