TypeScript Version: 3.1.0-dev.20180810
Code
const f = () => 0;
f.call = 0;
useF(f);
/** @param {() => number} f */
function useF(f) {
f.call(null);
}
Expected behavior:
Error on assigning f.call since that would change the type.
On this topic, f.length should be readonly.
Actual behavior:
No error (at compile time).
TypeScript Version: 3.1.0-dev.20180810
Code
Expected behavior:
Error on assigning
f.callsince that would change the type.On this topic,
f.lengthshould be readonly.Actual behavior:
No error (at compile time).