-
Notifications
You must be signed in to change notification settings - Fork 12.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
A computed property name in an interface must directly refer to a built-in symbol #13190
Comments
How would an implementation acquire the symbol for say, |
let handler: ResponseHandler = {
[location](lat: number, long: number) {
console.log(`User located at ${lat}, ${long}`);
}
} |
And where does that symbol come from? Is it something exported by the module that exports the interface? |
Yes it is defined above the interface in the example |
Duplicate of #5579 |
@nbransby right, of course! for some reason I thought you were using modules. I don't know why, as you do not in your example. |
Yes thats exactly the use case im after. My example is non-module based for simplicity but the symbols would be exported with the interface |
TypeScript Version: 2.1
When will TypeScript be able to type check this:
What I would like it to do is verify the methods defined on an object conforming to this interface have the right parameters based on the property symbol / type (in case of string)
The text was updated successfully, but these errors were encountered: