microsoft / microsoft/TypeScript

TS18030: An optional chain cannot contain private identifiers

Open
#42,734 2 comments 12 reactions 1 assignee View on GitHub

@armanio123 is already working on this.

Since Feb 10, 2021.

Bug Domain: classes Rescheduled
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Bug Report

🔎 Search Terms

TS18030

🕗 Version & Regression Information

v4.1.3

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______
⏯ Playground Link

Playground link with relevant code

💻 Code
class A {
	#p = 1;
	m (a? :A) {
		return a?.#p;
	}
}
🙁 Actual behavior

TS18030

🙂 Expected behavior

no error

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.