Closed
Description
TypeScript Version: 2.1
When will TypeScript be able to type check this:
const location = Symbol("Quick reply location")
const onText = Symbol("Text message responder")
const onLocation = Symbol("Location message responder")
const onImage = Symbol("Image message responder")
interface ResponseHandler {
[quickReply: string]: () => void
[location](lat: number, long: number): void
[onText](text: string): void;
[onLocation](lat: number, long: number): void;
[onImage](url: string): void;
}
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)