HomeToolsAbout

TSDoc

What Is It

Standardization of doc comments used in TS code

  • Multiple tools may use doc comments, so it's important to allow extraction of content without getting confused by each other's markup

Deprecation

Marking deprecation

/** @deprecated * deprecated, use x instead */ export const oldFunc = () => {}

Works for methods on Class

class SomeService { /** @deprecated Do not use oldRepository based methods */ private oldRepository: IOldRepository // this line will be stroke out this.repository = oldRepository; }

Works for Inversify Type Symbols

class SomeService { private repository: IRepository constructor ( /** @deprecated Do not use oldRepository based methods */ @inject(TYPES.OldService) ) // this line will be stroke out this.repository = oldRepository; }

Documentation

/** * @description what the below function does * @param param_name_1 what is the first parameter? * @param param_name_2 what is the second parameter? * @returns return_type what is the return type? */
AboutContact