Auto-generated JS API docs & TS cleanup#2313
Conversation
| pip install wheel | ||
| pip install -U -r doc/requirements.txt | ||
| pip install -U -e ./python | ||
| npm install typescript typedoc@0.19.2 |
There was a problem hiding this comment.
sphinx-js doesn't support newer versions yet.
| @@ -1,94 +1,13 @@ | |||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||
There was a problem hiding this comment.
Probably util is not the best name. Since these are all KV helpers, maybe something with kv in the name?
There was a problem hiding this comment.
app.ts to match the C++ ccfapp namespace?
There was a problem hiding this comment.
I don't think that's a good name. We may have more modules in the future and collectively they may be in the "ccfapp" namespace but modules != namespace.
There was a problem hiding this comment.
Let's ignore this for now and think about it again when we make it into a library.
|
letmaik/js-api-docs@20568 aka 20210315.22 vs main ewma over 20 builds from 20172 to 20556 |
|
Two things that are unrelated to documentation but which this PR made obvious to me:
|
achamayou
left a comment
There was a problem hiding this comment.
Thanks you for setting this up, I expect it will make the JS/TS interface considerably easier to use in practice.
Yep, I opened #2315 for that. |

Fixes #1765.
This uses sphinx-js and typedoc to generate API docs for the built-in parts of CCF. It does not (yet?) document the utility TypeScript module that can optionally be used for dealing with type conversions of KV map keys/values.
sphinx-js' TypeScript support is basic and the project acknowledges that and doesn't intend to work on it (since Mozilla doesn't use TypeScript themselves). Any improvements typically come from community PRs. I tried to work around various issues but it's not as pretty as it could be.
I also took the opportunity to split the built-in from the utility parts and move them into separate modules. There are no "automatic" breaking changes for existing apps since the original
ccf.tsmodule has to be vendored.