downlevel-dts icon indicating copy to clipboard operation
downlevel-dts copied to clipboard

JSDoc comments are incorrectly downleveled

Open ImRodry opened this issue 2 years ago • 0 comments

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;
}

ImRodry avatar Mar 20 '22 13:03 ImRodry