Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexed read from dictionary not considered potentially undefined under strictNullChecks #12287

Closed
Jessidhia opened this issue Nov 16, 2016 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@Jessidhia
Copy link

With typescript@master:

// with "strictNullChecks": true
interface A {
  [key: string]: string
}
const x: A = {}
const b = x['undefined']
// b is string instead of string | undefined
@normalser
Copy link

#9235

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants