joarwilk / flowgen

Generate flowtype definition files from TypeScript
Other
657 stars 87 forks source link

fix: prevent jsdoc see tag from causing crashes #173

Closed yradchen closed 2 years ago

yradchen commented 2 years ago

Previously the @see jsdoc tag would break flowgen compilation - check References issue

This adds some support for the @see tag, though there are still some issues (see https example in test). Overall, though I think it's an improvement since it prevents crashing and there are still a lot of other jsdoc issues as other complimentary tags like @link do not work.

Example of LINK tag not working (NOT AFFECTED BY THIS CHANGE)

/**
 * See {@link MyClass} and [MyClass's foo property]{@link MyClass#foo}.
 * Also, check out {@link http://www.google.com|Google} and
 * {@link https://github.com GitHub}.
 */
export declare function myFunction(): void;

Output by flowgen

/**
 * [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 */
declare export function myFunction(): void;
orta commented 2 years ago

Great, thanks

orta commented 2 years ago

Shipped in 1.18