react-docgen
react-docgen copied to clipboard
TS Path aliases seem to break type output
For example:
Works ✅
import { Theme } from '../themes/Theme'
export interface IconProps {
/** The color to use */
color?: keyof Theme['color']
}
Yikes! ❌
import { Theme } from @themes/Theme'
export interface IconProps {
/** The color to use */
color?: keyof Theme['color']
}
The bottom results in the following type annotation being output:
string | number | symbol instead of the expected 'primary' | 'secondary' | 'tertiary'