microsoft / microsoft/TypeScript
Not currectly parse superClass starts with `{}`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
### 🔎 Search Terms
"superClass"
### 🕗 Version & Regression Information
- This changed between versions ______ and _______
- This changed in commit or PR _______
- 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
_No response_
### 💻 Code
```ts
class A extends {}.Foo {}
```
```ts
class A extends {}! {}
```
### 🙁 Actual behavior
They are not correctly parsed as super class.
### 🙂 Expected behavior
They should both parse as superClass.
### Additional information about the issue
The following are correctly parsed.
```
class A extends {} {}
```
```
class A extends {Foo}.Foo {}
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two reported class declarations and compare their parsing with the working examples in the issue. Trace the TypeScript parser's handling of class heritage clauses and computed or non-null-asserted expressions, then add regression coverage for both forms. Done means both snippets are parsed with the intended superclass while existing examples remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100