TypeStat icon indicating copy to clipboard operation
TypeStat copied to clipboard

Add a strictNullCheck fixer for indexed keys/values

Open JoshuaKGoldberg opened this issue 6 years ago • 0 comments

const other: IStringDictionary<string> = {
    A: null
};

This should become A: null! or IStringDictionary<string | undefined>, depending on #41.

Also relevant:

const maybeKey: string | undefined = // ...
other[maybeKey];

JoshuaKGoldberg avatar Dec 24 '18 16:12 JoshuaKGoldberg