Closed
Description
openedon Dec 2, 2016
TypeScript Version: 2.1.1
Code
interface Dictionary {
[key: string]: any;
}
const plugins: Dictionary = {}
plugins.test = {}
const plugins2: {
[key: string]: any;
} = {}
plugins2.test = {}
Expected behavior:
no error
Actual behavior:
Property 'test' does not exist on type 'Dictionary'.
any
IMHO, dot style assignment should infer the property name as string
I think it's related to #6041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment