https://github.com/twoslashes/twoslash
Markup for generating rich type information in your documentations ahead of time.
https://github.com/twoslashes/twoslash
shiki twoslash typescript
Last synced: 10 months ago
JSON representation
Markup for generating rich type information in your documentations ahead of time.
- Host: GitHub
- URL: https://github.com/twoslashes/twoslash
- Owner: twoslashes
- License: mit
- Created: 2024-01-10T20:03:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-17T03:32:55.000Z (12 months ago)
- Last Synced: 2025-05-12T21:46:46.934Z (10 months ago)
- Topics: shiki, twoslash, typescript
- Language: TypeScript
- Homepage: https://twoslash.netlify.app/
- Size: 2.76 MB
- Stars: 675
- Watchers: 1
- Forks: 24
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome - twoslashes/twoslash - Markup for generating rich type information in your documentations ahead of time. (TypeScript)
README

# Twoslash
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]
[📚 Documentation](https://twoslash.netlify.app/) | [⚙️ Migration Guide](https://twoslash.netlify.app/guide/migrate)
A markup format for TypeScript code, ideal for creating self-contained code samples which let the TypeScript compiler do the extra leg-work. Inspired by the [fourslash test system](https://github.com/orta/typescript-notes/blob/master/systems/testing/fourslash.md).
This project is the successor of [`@typescript/twoslash`](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/ts-twoslasher).
## License
MIT License © [Orta Therox](https://github.com/orta), [Anthony Fu](https://github.com/antfu), Microsoft Corporation
[npm-version-src]: https://img.shields.io/npm/v/twoslash?style=flat&colorA=161514&colorB=EAB836
[npm-version-href]: https://npmjs.com/package/twoslash
[npm-downloads-src]: https://img.shields.io/npm/dm/twoslash?style=flat&colorA=161514&colorB=E66041
[npm-downloads-href]: https://npmjs.com/package/twoslash
[bundle-src]: https://img.shields.io/bundlephobia/minzip/twoslash?style=flat&colorA=161514&colorB=45627B&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=twoslash
[license-src]: https://img.shields.io/github/license/twoslashes/twoslash.svg?style=flat&colorA=161514&colorB=45627B
[license-href]: https://github.com/twoslashes/twoslash/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-161514?style=flat&colorA=161514&colorB=EAB836
[jsdocs-href]: https://www.jsdocs.io/package/twoslash