Missing type definition for variable declaration
j3rem1e opened this issue · comments
Type definition are not keeped for exported variable, for example:
export const type: string = null;
/**
* Size.
*/
export let size: "small"|"medium" = null;
should be transpiled to :
/** @type {string} */
export const type = null;
/**
* Size.
* @type {"small"|"medium"}
*/
export let size = null;
Context: I'm trying to integrate this lib to transpile a svelte component!
Hmm, I seem to be missing something here..
var transpile = require("ts-to-jsdoc")
transpile(`
const groups: Record<string, string[]> = {
test: ['a', 'b']
} as const;
`);
results in
const groups = {
test: ['a', 'b']
};
Is there something else I am meant to be setting up?