Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reference incorrectly created for this within a JSXIdentifier #4055

Closed
@bradzacher

Description

@bradzacher

Repro

import React from 'react';

class Hello extends React.Component<{tag: () => React$MixedElement}> {
  inline() {
    return <this.props.tag />
  }
}

Expected Result

The this should be treated like a ThisExpression.

Actual Result

The this is treated like a variable called this, and thus creates an unclosed reference to a variable that can never exist.

Additional Info

Context: #3788 (comment)
cc @ljharb

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinggood first issueGood for newcomerspackage: scope-managerIssues related to @typescript-eslint/scope-manager

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions