-
Notifications
You must be signed in to change notification settings - Fork 97
Description
Description
Change the documentation step build:docs in bindings/wasm/package.json to include custom Typescript definitions in the generated bindings/wasm/docs/api-reference.md file.
Motivation
The api-reference.md file which is imported to the wiki, excludes all custom Typescript sections, which we use liberally for function parameter options.
This is because the docs are generated from identity_wasm.js using jsdoc-to-markdown. This file excludes the aforementioned custom Typescript sections such as IdentitySetup, leading to broken intradoc links for those definitions and general confusion.
We should instead generate the Wasm API reference from identity_wasm.d.ts, which includes all relevant Typescript definitions.
Unclear how this should be achieved:
- we could try configure
jsdoc-to-markdownto work with the Typescript file: https://github.com/jsdoc2md/jsdoc-to-markdown/wiki/How-to-document-TypeScript - or switch to a different tool such as
typedoc, if it can be integrated with Docusaurus (wiki) cleanly, - or any other method adopted by other Typescript projects.
Resources
- Identity Wasm API Reference: https://wiki.iota.org/identity.rs/libraries/wasm/api_reference
jsdoc-to-markdownTypescript guide: https://github.com/jsdoc2md/jsdoc-to-markdown/wiki/How-to-document-TypeScripttypedoc: https://github.com/TypeStrong/typedoc
To-do list
- Generate Wasm API reference from
bindings/wasm/node/identity_wasm.d.tsinstead ofidentity_wasm.js. - Update wiki if changes are required.
Change checklist
Add an x to the boxes that are relevant to your changes, and delete any items that are not.
- The feature or fix is implemented in Rust and across all bindings whereas possible.
- The feature or fix has sufficient testing coverage
- All tests and examples build and run locally as expected
- Every piece of code has been document according to the documentation guidelines.
- If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
- If the feature is not currently documented, a documentation task Issue has been opened to address this.