# Bug Report <!-- Please fill in each section completely. Thank you! --> ### π Search Terms narrow property const ### π Version & Regression Information 4.9.0-dev.20221025 ### β― Playground Link <!-- A link to a TypeScript Playground "Share" link which shows this behavior The TypeScript Workbench can be used for more complex setups, try https://www.typescriptlang.org/dev/bug-workbench/ As a last resort, you can link to a repo, but these will be slower for us to investigate. --> [Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.9.0-dev.20221025#code/JYOwLgpgTgZghgYwgAgCJzHZBvAUMg5OAfgC5kQBXAWwCNpcBfXXAEwgQBs4oUEB7EAGcwyVhjjl0mFpwiiA1hACeyALzIA5HE1EhyAcLAtgMZAApxmAHRYAhGo2UQ7GKAisAlDnyEly3wIAeiCAPWJAg0ERInUxCQBtfwBdSJDCZHDIwxjaOKs4BO1NVIz0wizGIA) ### π» Code <!-- Please post the relevant code sample here as well--> ```ts interface Data { a?: number } declare const data: Data let key = 'a' as const if (data.a !== undefined) { key // "a" const a = data[key] // number | undefined const b = data['a'] // number } ``` ### π Actual behavior `data[key]` is `number | undefined` ### π Expected behavior `data[key]` is narrowed to `number`