Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't extract types from namespace type. #245

Open
sxhuan opened this issue Jan 14, 2023 · 0 comments
Open

Can't extract types from namespace type. #245

sxhuan opened this issue Jan 14, 2023 · 0 comments

Comments

@sxhuan
Copy link

sxhuan commented Jan 14, 2023

I use namespace to define common types like below:

export declare namespace TypeAttributes {
  type Color =
    | "primary"
    | "secondary"
    | "success"
    | "warning"
    | "danger"
    | "info";
}

and use it in type definition.

export type ComponentProps = {
  /**
   * The color to apply to component
   */
  color?: TypeAttributes.Color;
}

it shows: Type: TypeAttributes.Color instead of "union, one of xxxxx".

any idea how to make this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant