#Twoslash

洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Every library I maintain uses Twoslash. I still haven't regretted it, even when Fedify's docs take nearly ten minutes to build. That wait is annoying. I keep paying it.

For a TypeScript library, the type signature often does most of the explaining. I used to write sentences describing what a function returns. Now I'd rather let show the compiler's answer inline. That removes one common way my docs used to go stale.

洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Every library I maintain uses Twoslash. I still haven't regretted it, even when Fedify's docs take nearly ten minutes to build. That wait is annoying. I keep paying it.

For a TypeScript library, the type signature often does most of the explaining. I used to write sentences describing what a function returns. Now I'd rather let show the compiler's answer inline. That removes one common way my docs used to go stale.

洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Every library I maintain uses Twoslash. I still haven't regretted it, even when Fedify's docs take nearly ten minutes to build. That wait is annoying. I keep paying it.

For a TypeScript library, the type signature often does most of the explaining. I used to write sentences describing what a function returns. Now I'd rather let show the compiler's answer inline. That removes one common way my docs used to go stale.

洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Every library I maintain uses Twoslash. I still haven't regretted it, even when Fedify's docs take nearly ten minutes to build. That wait is annoying. I keep paying it.

For a TypeScript library, the type signature often does most of the explaining. I used to write sentences describing what a function returns. Now I'd rather let show the compiler's answer inline. That removes one common way my docs used to go stale.

洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Every library I maintain uses Twoslash. I still haven't regretted it, even when Fedify's docs take nearly ten minutes to build. That wait is annoying. I keep paying it.

For a TypeScript library, the type signature often does most of the explaining. I used to write sentences describing what a function returns. Now I'd rather let show the compiler's answer inline. That removes one common way my docs used to go stale.

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@fosstodon.org

is great for improving the quality of the docs, but the downside is that it slows down the build time tremendously. 😩

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@fosstodon.org

I'm applying to the docs. It works like magic! When I'm done, the Fedify docs will be even easier to read the example code than they are now.

The mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.
ALT text detailsThe mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.