I'm working on creating a reusable type that is used as arguments in several functions. However, I've noticed that intellisense only displays descriptions added to interfaces and not the original type declaration.
For example, why does the description for Prop1 show up https://i.sstatic.net/Zz1rd.png
but the description for my formattedString (
/** Use this format: xx-xxxx-xxx */
) does not? Even though intellisense recognizes the definition of SomeFormattedString
.
https://i.sstatic.net/I4ocr.png
/** Use this format: xx-xxxx-xxx */
export declare type SomeFormattedString = string
export declare interface SomeInterface {
/** bla bla 1 description. */
bla1?: boolean;
/** bla bla 2 description. */
bla2?: boolean;
}
export declare interface MyFunctionParams {
/** Prop1 description. */
prop1?: string;
/** Prop2 description. */
prop2?: string;
someInterface: SomeInterface;
formattedString: SomeFormatedString;
}