Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

馃悰 Incorrect detecting this as undeclared with noUndeclaredVariables enabled #4642

Closed
1 task done
public opened this issue Jun 30, 2023 · 0 comments 路 Fixed by #4675
Closed
1 task done

馃悰 Incorrect detecting this as undeclared with noUndeclaredVariables enabled #4642

public opened this issue Jun 30, 2023 · 0 comments 路 Fixed by #4675
Labels
S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@public
Copy link

public commented Jun 30, 2023

Environment information

Playground. And `12.1.3-nightly.3de5a1a`

What happened?

Playground Example

This code defines types that actually work for T1 and T2.

class X {
  f() {
    type T1 = typeof this.g;
    type T2 = typeof X['g'];
  }

  g() {
  }
}

Rome will incorrectly throw an error that this is not declared on the T1 line.

Expected result

This code does not complain about undeclared variables.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@public public added the S-To triage Status: user report of a possible bug that needs to be triaged label Jun 30, 2023
@public public changed the title 馃悰 Incorrect error with noUndeclaredVariables 馃悰 Incorrect detecting this as undeclared with noUndeclaredVariables enabled Jun 30, 2023
@Conaclos Conaclos added S-Bug: confirmed Status: report has been confirmed as a valid bug and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants