Hacker News new | ask | show | jobs
by vicapow 2556 days ago
There is not a 1-1 metric for "coverage" across these two systems. For exmaple, TS believes this code is "covered" but Flow knows it's not safe:

type A = { readonly prop: number }; type B = { prop: number };

function func(f: B) { f.prop = 20; return f; }

const a: A = { prop: 10 }; func(a); // no error?