typedoc-plugin-as-member-of

1.0.2 • Public • Published

About

TypeDoc plugin to 'move' declarations as members of existing classes, interfaces, objects, etc

Example - declare event as a function outside your class / interface and use @decl-as-member-of so they appear as members of existing classes/interfaces)

/** something that moves with an engine */
interface Vehicle {
  /** start the engines of this emitter, probably firing [[beforeEngineStart]] event */
  startEngines();
}
/**
 * Event fired just before the engines of this vehicle start. 
 * @asMemberOf Vehicle
 * @event 
 */
declare function beforeEngineStart(engineData: {status: string; temp: number; }[]): number;

Because the function has the @event annotation the plugin will also mutate the function into an event besides moving it.

Output example

Install and Usage

npm install --save-dev typedoc-plugin-as-member-of
typedoc --out out --plugin typedoc-plugin-as-member-of ./src

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    7,296
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    7,296
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i typedoc-plugin-as-member-of

Weekly Downloads

7,296

Version

1.0.2

License

MIT

Unpacked Size

34.2 kB

Total Files

20

Last publish

Collaborators

  • cancerberosgx