Looking around StackOverflow and various blog posts, it seems like the event tag might be one of the least-well-understood tags. Right now, as far as I can tell, tsd-jsdoc just ignores it.
I think it's meant to work similarly to a @typedef -- when I declare an event, I'm saying that the owning function / class / namespace will at some point invoke a callback with an object that has certain properties. That sounds a lot like a TypeScript interface.
What I'm suggesting is that tsd-jsdoc treat these as equivalent:
/**
* @typedef {Object} Foo.BarEvent
*
* An Event with an "x" property
*
* @property {number} x
*/
/**
* An Event with an "x" property
* @event Foo.BarEvent
*
* @type {Object}
* @property {number} x
*/
In both case an interface called BarEvent should be created in the namespace Foo.
Looking around StackOverflow and various blog posts, it seems like the event tag might be one of the least-well-understood tags. Right now, as far as I can tell,
tsd-jsdoc
just ignores it.I think it's meant to work similarly to a
@typedef
-- when I declare an event, I'm saying that the owning function / class / namespace will at some point invoke a callback with an object that has certain properties. That sounds a lot like a TypeScript interface.What I'm suggesting is that
tsd-jsdoc
treat these as equivalent:In both case an interface called
BarEvent
should be created in the namespaceFoo
.