downlevel-dts
downlevel-dts copied to clipboard
JSDoc comments are incorrectly downleveled
I recently came across an issue with this package where JSDoc comments in getters would get incorrectly downleveled and become regular multi-line comments, which lose all the properties of a JSDoc comment. Here's an example of that taken from the bson package
declare class ObjectId {
/**
* The generation time of this ObjectId instance
* @deprecated Please use getTimestamp / createFromTime which returns an int32 epoch
*/
get generationTime(): number;
set generationTime(value: number);
}
becomes
declare class ObjectId {
/*
* The generation time of this ObjectId instance
* @deprecated Please use getTimestamp / createFromTime which returns an int32 epoch
*/
generationTime: number;
}