-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Wrong: All members must conform to the string index signature? #618
Comments
I also tried the examples and they did work for me too. I think what the author actually meant is that when such an interface is defined: interface Foo {
[index: string]: number
}; any members which have a const foo: Foo = {
x: 1, // Okay
y: 'abc' // Error
}; If this is the case, this tutorial section examples are misleading. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
origin
i copied the Foo and Bar into ts playground and it works.
The text was updated successfully, but these errors were encountered: