TSUtilitiesTypes

TSUtilitiesTypes

This class adds extra type definitions for TypeScript utility types. If the project includes a typedef file, the definitions will be added at the end of the file; otherwise, they'll be added to the first file being parsed.

Constructor

new TSUtilitiesTypes(events, EVENT_NAMES)

Source:
Parameters:
Name Type Description
events EventEmitter

To hook to the necessary events to add the definitions.

EVENT_NAMES EventNames

To get the name of the events the class needs to listen for.

Methods

_findTypedefFile(event)

Source:

This is called by the plugin before the parsing beings, so the class can identify if the project includes a typedef file.

Parameters:
Name Type Description
event JSDocParseBeginEventPayload

The event information, with the list of files that going to be parsed.