Closed vkurchatkin closed 4 years ago
Thank you for contribution ^_^
No, it's not ok. Here is a simple example of a runtime error:
function foo(obj: { a : number | string }) {
obj.a = 'foo';
}
const f: ({ a: number}) => undefined = foo;
const obj = { a: 1 };
f(obj);
obj.a.toFixed(); // BOOM
Hmmm, really. I Will fixed it soon. Thank you a lot for your contribution ^_^
Small example: