We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following rescript code:
type status = | /** If this is started or not */ Started(t) | /** Stopped? */ Stopped | /** Now idle.*/ Idle
is supposed to be extracted as the following (partial) json:
{ "id": "DocExtractionRes.SomeInnerModule.status", "kind": "type", "name": "status", "signature": "type status = Started(t) | Stopped | Idle", "docstrings": [], "detail": { "kind": "variant", "items": [ { "name": "Started", "docstrings": ["If this is started or not"], "signature": "Started(t)" <-- HERE }, { "name": "Stopped", "docstrings": ["Stopped?"], "signature": "Stopped" }, { "name": "Idle", "docstrings": ["Now idle."], "signature": "Idle" }] } },
Especially mind the Started constructor having it's payload present in the json details' signature field!
Started
signature
Whereas it seems that the payload is not exported into it's json signature field, if it is an inline-record: e.g. the following code:
type someVariantWithInlineRecords = | /** This has inline records...*/ SomeStuff({offline: bool})
is currently tested to result in the following (partial) json:
{ "id": "DocExtractionRes.AnotherModule.someVariantWithInlineRecords", "kind": "type", "name": "someVariantWithInlineRecords", "signature": "type someVariantWithInlineRecords =\\n | SomeStuff({offline: bool})", "docstrings": ["Trying how it looks with an inline record in a variant."], "detail": { "kind": "variant", "items": [ { "name": "SomeStuff", "docstrings": ["This has inline records..."], "signature": "SomeStuff" <-- HERE }] } },
Even though the SomeStuff Variant Constructor has a payload, it is not reflected in the extracted details contents.
SomeStuff
I woult at least expect the detail item json to be:
{ "name": "SomeStuff", "docstrings": ["This has inline records..."], "signature": "SomeStuff({offline: bool})" <-- HERE }
Is this a bug or a technical limitation?
edit: Ideally, the docs of the inline-record would get extracted as well, by the same rules a "normal record" would be.
The text was updated successfully, but these errors were encountered:
Bug most likely, not a technical limitation.
Sorry, something went wrong.
@woeps #889 this should fix it.
Successfully merging a pull request may close this issue.
Given the following rescript code:
is supposed to be extracted as the following (partial) json:
Especially mind the
Started
constructor having it's payload present in the json details'signature
field!Whereas it seems that the payload is not exported into it's json
signature
field, if it is an inline-record:e.g. the following code:
is currently tested to result in the following (partial) json:
Even though the
SomeStuff
Variant Constructor has a payload, it is not reflected in the extracted details contents.I woult at least expect the detail item json to be:
Is this a bug or a technical limitation?
edit:
Ideally, the docs of the inline-record would get extracted as well, by the same rules a "normal record" would be.
The text was updated successfully, but these errors were encountered: