atlassian / atlassian/extract-react-types

Can't extract types from namespace type.

Open
#245 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
188
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.