Using the protocol for other languages (in particular python)
I find twoslash enabled doc to be really helpful when reading typescript projects that use them in their docs. I have been working on a few personal projects that use shiki for syntax highlighting some python files. I saw that there was a twoslash protocol that was created (https://github.com/twoslashes/twoslash/issues/17#issue-2118958025) to allow for things other than the typescript language server to generate the info that twoslash needs to render it. I was wondering what the steps would be to get the data generated into twoslash for rendering in to shiki?
Also if i wanted to include the docstrings for the nodes would I need to convert them into the jsdoc equivalents or what format do the strings of the types bellow need to be?
https://github.com/twoslashes/twoslash/blob/fcc90743beb3d5e26d1dda2e2cda02920bd092ec/packages/twoslash-protocol/src/types/nodes.ts#L15-L25
6 条评论