Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typed snippets with Shiki Twoslash #1239

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Typed snippets with Shiki Twoslash #1239

merged 1 commit into from
Sep 11, 2024

Conversation

chgeo
Copy link
Member

@chgeo chgeo commented Sep 8, 2024

Adds the Shiki Twoslash plugin to enable type-augmented JS/TS snippets.

image

First scope is

  • cds-typer docs
  • cds-server docs

Typed models (in @cds-models/*) are generated through a markdown renderer plugin that runs cds-typer.

@chgeo chgeo force-pushed the twoslash branch 9 times, most recently from becafa7 to edce438 Compare September 10, 2024 13:59
@chgeo chgeo marked this pull request as ready for review September 10, 2024 14:42
@chgeo chgeo requested a review from daogrady September 10, 2024 14:42
@chgeo chgeo changed the title Typed typer docs with twoslash Typed docs with twoslash Sep 10, 2024
@chgeo chgeo changed the title Typed docs with twoslash Typed docs with Shiki Twoslash Sep 10, 2024
@chgeo chgeo changed the title Typed docs with Shiki Twoslash Typed snippets with Shiki Twoslash Sep 10, 2024
Copy link
Contributor

@swaldmann swaldmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great in the preview and might help us get a better eye for incomplete/overly complex/incorrect types in our APIs 👍

@chgeo chgeo merged commit 481d1e7 into main Sep 11, 2024
4 checks passed
@chgeo chgeo deleted the twoslash branch September 11, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants