It's also necessary here because TypeScript has exceptions and you'd expect your `defer`s to execute even when an exception is thrown.