JoshuaKGoldberg / JoshuaKGoldberg/TypeStat

SNC missing first property in PropertyAccessExpression

Open
#1,015 2 comments 0 reactions 0 assignees View on GitHub
area: fixers fixer: strict non null assertions good first issue status: accepting prs type: bug
Dominant language
TypeScript
Stars
2.3k
Forks
47
Avg merge
15h 55m
Merged PRs (30d)
21

Description

### 🐛 Bug Report

- TypeStat version: 0.5.3
- TypeScript version: 4.4.4
- Node version: 16.x

Getting lazy with repro steps, as ill just add it as test. posting as text below:

```
type C = string | null;
type B = { C: C } | null;
type A = { B: B } | null;

const A1 = {
B: {
C: null
}
} as A;

const x: string = A1.B.C;
```

#### Actual Behavior

```
const x: string = A1.B!.C!;
```

#### Expected Behavior

```
const x: string = A1!.B!.C!;
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.