import { todo, unimplemented, unreachable } from 'unimpl';
function function1(): string {
const needToImplement = true;
if (needToImplement) {
return todo(); // Throws an error 'Not yet implemented'
}
}
function function2(): string {
const needToImplement = true;
if (needToImplement) {
return unimplemented(); // Throws an error 'Not implemented'
}
}
function function3(): string {
const needToExit = true;
if (needToExit) {
return 'Exit function here';
}
return unreachable(); // Throws an error 'Internal error: entered unreachable code'
}