Now
async function main() {
try {
} catch (error) {
console.error(error)
}
}
await main()
console.log("done")
// so it can be called like this in some script.ts
import {mainWithError} from "nikiv/utils"
await mainWithError() {
throw new Error("some err")
}
// can this work with the `await main() in the nikiv/utils itself
Now
mainWithError(below into 1 exportable function)