This has been thrown together in a sleepless night 🌙.
After digging into the georgeous Scriptable app I wanted to improve the developer experience by providing types for the Scriptable API. So all efforts have been a bit biased to my needs to parse the provided documentation.
Some missing things that would be nice once another sleepless night comes around:
- some unit tests
- using e.g. ts-morph to build the AST
- running it against some other generated docs
- typings for the mkdocs json format (is there at least some schema out there?)
npm i -D @davidenke/mkdocs-ts
or
npm install --save-dev @davidenke/mkdocs-ts
or
pnpm install --dev @davidenke/mkdocs-ts
or
yarn add --dev @davidenke/mkdocs-ts
mkdocs-ts <input: file path or URL> <output: path to target file>
npm run mkdocs-ts ./example.json example.d.ts
or
npm run mkdocs-ts https://some.remote/example.json example.d.ts