typedoc-plugin-typescript-declaration
Advanced tools
Comparing version 0.2.7 to 0.2.8
{ | ||
"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"; | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57501
139