Socket
Socket
Sign inDemoInstall

typedoc-plugin-as-member-of

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedoc-plugin-as-member-of

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


Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 27 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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