atlassian / atlassian/extract-react-types

Type support checklist ✅

Open
#149 0 comments 0 reactions 1 assignee Claimed by @danieldelcore View on GitHub
💬 discussion enhancement help wanted
Dominant language
JavaScript
Stars
188
Forks
31
PR merge metrics
No merged PRs in 30d

Description

The way ERT evaluates complex types and language specific features is largely a manual process. We have to manually tell ERT how to interpret things like `extends` and `React.FC

`, so inevitably there will be things that we don't support or haven't considered.

This issue aims to track what features we do and don't support and in cases where a feature is unsupported, we hope to provide a suitable bail-out, similar to what is suggested here #141

If there's something missing on this list, please leave a comment below 😄

## TypeScript
- primitive types `boolean, array, string, number` ✅
- `any` ✅
- `unknown` ✅
- `void` ✅
- functions ✅
- `array[]` & `Array<>` ✅
- interfaces ✅
- types `type foo = string` ✅
- union types `'foo' | 'bar'` ✅
- intersection types `Foo & Bar` ✅
- extends ✅
- keyof ❌
- as ❌
- [template literal types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#template-literal-types) ❌
- [index signatures](https://www.typescriptlang.org/docs/handbook/advanced-types.html#index-types-and-index-signatures) ❌
- [conditional types](https://www.typescriptlang.org/docs/handbook/advanced-types.html#conditional-types) ❌

## [TypeScript utility types](https://www.typescriptlang.org/docs/handbook/utility-types.html)
- `Omit<>` ❌
- `Partial<>` ❌
- `Record<>` ❌
- `Pick<>` ❌
- `ReturnType<>` ❌

## [TypeScript via @types/react](https://www.npmjs.com/package/@types/react)
- `React.FC` ✅
- `React.memo` ✅
- `React.forwardRef` ✅

## Flow
TBD

## Related issues
#59
#141

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.