Cannot parse anonymous classes

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
babel, javascript, react
Domain
frontend, tooling

Research direction

The issue names no files, tests, or entry points. Start by reproducing the anonymous React.PureComponent input and tracing the path that produces “no converter for: null”; done means either unnamed classes are supported or the issue receives a clear, explicit rule and error message, though the preferred direction remains undecided.

Written by the indexing model from the issue text.

Description

Currently

export default class extends React.PureComponent<Props> {}

fails with a cryptic 'no converter for: null' error. We implicitly expect all classes (and maybe functions) passed to us to be named.

To resolve this we need to either:

a) Make this an explicit rule and add useful error messaging

or

b) Support unnamed classes (and maybe functions)

I am leaning towards b)

Dominant language
JavaScript
Stars
188
Forks
31
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from atlassian/extract-react-types

All issues in atlassian/extract-react-types

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.