Closed
Description
opened on Dec 12, 2015
For example:
type Method = 'get' | 'post';
let app = {
get() { },
post() { },
foo() { },
bar: 123
};
let methodA = 'get';
let handlerA = app[methodA]; // typeof handlerA === () => void
let methodB: Method;
let handlerB = app[methodB]; // typeof handlerB === () => void
Activity