TypedownMotivationsI often need to convert TypeScript definitions to Markdown to include them in a For more advanced use cases, you may want to check other solutions like TypeDoc (used internally). UsageYou can export TypeScript definitions from either a file or a folder by invoking the associated Typedown command from the Visual Studio Code Command Palette (⌘ + ⇧ + P on macOS or Ctrl + ⇧ + P on Windows & Linux by default):
The extension will collect your exported TypeScript definitions and present them to you in a custom Visual Studio Code editor fitting your theme where you will be able to select which definitions to export to Markdown. You can also select the heading level to use for the definition names. When done, press the DefinitionsCurrently, only TypeScript interfaces & type aliases exported from your code are converted to Markdown. Some comments and JSDoc tags in your code can also be used when exporting your definitions to infer a description, a default value, etc. For example, imagine the following interface:
The generated Markdown code is:
The rendered Markdown for this interface is:
LicenseLicensed under the MIT License, Copyright © HiDeoo. See LICENSE for more information. |