The current Getting Started examples are broken because 1) they don't
specify the Anthropic SDK version and 2) they use exports from a
deprecated beta version.
The example code has now been migrated in the cookbook
(https://github.com/e2b-dev/e2b-cookbook/commit/d28460156cf07e23c114581dc6dfafb71493418d)
so I'm copying it into the documentation here to fix the examples.
The Anthropic SDK version has also been notes to avoid our examples
suddenly breaking in the future.
# Description
- Installed and configured
[typedoc](https://github.com/TypeStrong/typedoc) and its plugin
[typedoc-plugin-markdown](https://github.com/typedoc2md/typedoc-plugin-markdown)
- Created a script that generates and cleans markdown files
# Test
```bash
cd packages/js-sdk
./scripts/generate_api_ref.sh
ls ./api_ref
```
# Considerations
This could eventually be used directly as .mdx in the docs nextjs app,
it would look like this with current styling and TOC:
<img width="340" alt="Screenshot 2024-09-18 at 17 29 22"
src="https://github.com/user-attachments/assets/69e1f01d-cab9-4d8c-8eac-23bc367ae03c">
<img width="685" alt="Screenshot 2024-09-18 at 17 29 32"
src="https://github.com/user-attachments/assets/a585a363-ceb2-48bf-a24d-a7c440607f61">
<img width="659" alt="Screenshot 2024-09-18 at 17 29 45"
src="https://github.com/user-attachments/assets/5591b353-70dc-440a-be2f-890dee057593">
per my previous slack messages:
> typedoc and its typedoc-plugin-markdown are more opinionated than i
assumed.
The extent of how detailed it documents things about classes and
interfaces is less configurable than i thought, for example it forces
you to display all inheritance info (there's a plugin to remove that but
it's clunky) . Also, linking is not configurable when you are converting
to markdown, it seems to keep routing as if it were a static website
directory with relative links so i removed all links.
Had to create a hacky post-processor to handle these obstacles.
i wish i could figure out a way to use anchor links, i looked into
[typedoc-plugin-pages](https://github.com/KnodesCommunity/typedoc-plugins/tree/develop/packages/plugin-pages)
but couldn't get it to behave the way I want.