Arrow functions are not supported
weakish opened this issue · comments
Type info of parameters of arrow functions are stripped.
type Video = {
id: string;
// more fields
};
type Playlist = {
videos: Video[];
};
const fetchPlaylist = async (
playlistId: string,
): Promise<Playlist> => {
// some code
};
will just be converted to
const fetchPlaylist = async (playlistId) => { /* code */}
However, if refactor fetchPlaylist to async function fetchPlaylist()
,
ts-to-jsdoc will convert type infos to JSDoc successfully.