You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many code editors support JSDoc comments, displaying their content while showing suggestions.
For example in src/api/chia/consensus/block_record.ts, if we replace:
exporttypeBlockRecord={header_hash: bytes32;// bytes32prev_hash: bytes32;// bytes32 # Header hash of the previous block
...
with
exporttypeBlockRecord={header_hash: bytes32;// bytes32/** * Header hash of the previous block */prev_hash: bytes32;// bytes32
...
or
exporttypeBlockRecord={header_hash: bytes32;// bytes32/** Header hash of the previous block */prev_hash: bytes32;// bytes32
...
Then the emitted declaration file will retain the JSDoc comment and we will get in-editor suggestions.
Since I don't know whether you extract the types from the chia code base manually or with a script, I am posting this as an issue first, but I will gladly contribute a PR in either case.
The text was updated successfully, but these errors were encountered:
I manually check the chia code one by one.
JSDoc comments are good if what they say are correct and easy to understand.
What do you think should be a good source of those JSDocs?
To begin with, I was thinking to use the existing single-line comments appended after the data type property names in the chia-blockchain source code, which you helpfully copied over along with names of the original python types (which would also be helpful).
Many code editors support JSDoc comments, displaying their content while showing suggestions.
For example in
src/api/chia/consensus/block_record.ts
, if we replace:with
or
Then the emitted declaration file will retain the JSDoc comment and we will get in-editor suggestions.
Since I don't know whether you extract the types from the chia code base manually or with a script, I am posting this as an issue first, but I will gladly contribute a PR in either case.
The text was updated successfully, but these errors were encountered: