react-docgen icon indicating copy to clipboard operation
react-docgen copied to clipboard

TS Path aliases seem to break type output

Open sami616 opened this issue 5 years ago • 0 comments

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'

sami616 avatar Jun 07 '20 07:06 sami616