Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typedoc-plugin-typescript-declaration

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedoc-plugin-typescript-declaration - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

2

package.json
{
"name": "typedoc-plugin-typescript-declaration",
"version": "0.2.7",
"version": "0.2.8",
"description": "Typedoc plugin to render to typescript declaration file",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -92,1 +92,48 @@ # typedoc-plugin-typescript-declaration

```
## Inlining `keyof` types
You can use this plugin to *@inline* `keyof` types directly into a union to produce a more concise document and `.d.ts` file.
In addition to comments for each of the keys will also be documented as part of the `@inline` type.
### Example
Sample file:
```ts
/**
* @inline
*/
type SwitchState = keyof {
/**
* Switch is on
*/
on: string,
/**
* Switch is off
*/
off: string,
/**
* State of the switch is uknown
*
* @since 2.0
*/
unknown: string,
};
```
Produces the following (with `--maxVersion 1.0`):
```ts
/**
* Options:
*
* - `on`:
* Switch is on
*
* - `off`:
* Switch is off
*/
type SwitchState = "on" | "off";
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc