Open
Description
Hello,
I can't find any documentation on adding tsdocs to a typescript string literal type. I was wondering if the following is possible:
type InputType =
/** the TSDoc doesn't work for num1, but I'd like it to */
| 'num1'
/** the TSDoc doesn't work for num2, but I'd also like it to */
| 'num2'
export const test = (...input: InputType[]) => {
return input
}
// I'd like to get the TSDoc from 'num1' string literal to show up
// when inputting it into the `tac` function but it does not currently show
test('num1')
I'm not 100% tied to using string literal types, so if there is another way to do this with enums
, etc., I'd love to learn 😄
If the above is not currently possible, I'd love to work to add it to tsdoc (with some guidance 😄).
Thanks!