Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Convert Jsdoc types to TypeScript types #199

Open
aminya opened this issue Jan 20, 2021 · 0 comments
Open

Convert Jsdoc types to TypeScript types #199

aminya opened this issue Jan 20, 2021 · 0 comments

Comments

@aminya
Copy link
Contributor

aminya commented Jan 20, 2021

It would be awesome if flow-to-ts can convert JsDoc type annotations to TypeScript types and inline them.

I have been working on an old project that does this:
https://github.com/aminya/jsdoc2flow

If you are interested, I can try to merge it into flow-to-ts!

Example:

/**
 * @param {string} x explanation about x
*/
function myFunc(x) {
	console.log(x)
}

should become

/**
 * @param {string} x explanation about x
*/
function myFunc(x: string) {
	console.log(x)
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant