englercj / tsd-jsdoc

Compiles JSDoc annotated JavaScript into a Typescript Definition file (.d.ts)
MIT License
316 stars 42 forks source link

Support <reference types="node" /> and adding import #150

Open chaliy opened 2 years ago

chaliy commented 2 years ago

I have my class extending EventEmitter from node

import { EventEmitter } from "events";
class Messenger extends EventEmitter {
}

After I am generating types.d.ts, it does not include reference to node and import:

<reference types="node" />

import { EventEmitter } from "events";

Is there any way to instruct tsd-jsdoc to generate such reference and import?