Closed
Description
TypeScript Version: 2.5.2 / nightly (2.6.0-dev.20170910)
Code
interface MyInterface {
exec(action: 'action_1'): void;
exec(action: 'action_2'): void;
exec(action: string): void;
}
const test: MyInterface = {
exec(arg) {
// `arg` type is `any`
}
};
Expected behavior:
I would expect arg
type to be "action1"|"action2"|string
.
Actual behavior:
arg
type is any
.