2 ms·
Refactoring is easier when you have either tests or types, but I think it's easiest when you have types as tests don't always remain compatible during refactori
by striking 4y ago
Refactoring is easier when you have either tests or types, but I think it's easiest when you have types as tests don't always remain compatible during refactorings. In TypeScript I let the types guide me as I change code. Too many times I've looked at a type error, thought "why would this be an issue", ignored it, patched up my test suite, and realized the type checker was right all along; I would have saved time just listening to the types.