Setup API Extractor and documenter #144
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Can be reviewed commit by commit, each commit contains a message with details.
Unfortunately, it seems the API-extractor/API-documenter, does not deal well with callable interfaces and types and especially the ones with overloads. I could find an easy to document the overloads. Currently the documentation for each overload of the ReadCallback is ignored.
Summary of the commit messages:
Simplify index exports
Anything in these files should be exported, let's simplify.
API Extractor examples look like this.
Reformat tsconfig.json
Change the identation to 4.
Reformat using
reformatin VSCode.This will make review easier.
Setup API Extractor and API Documenter
Initialisation steps:
npx api-extractor initto generate the initial configurationmkdir config(following recommended practices)mv api-extractor.json config/api-extractor.jsoncOutput folder
etcwill produce the report it is recommendedto keep this report to track and review API differences.
Output folder
docwill contain the API documentation inmarkdown format.
Change build folder from
disttolibwhich is the api-extractordefault (so following api-extractor recommended).
See:
https://api-extractor.com/
https://api-extractor.com/pages/setup/generating_docs/
Configure API extractor
Add TSDoc public tags
Update package.json
Add more API documentation