Type error when returning Effect directly in TypeScript

Does anyone recognize this behavior? Not understanding why storing the program Effect in a variable before returning works but returning directly gives a type error.
The error fixes itself after restarting TS server but it breaks again on almost any file change.
I can't reproduce it in the TypeScript playground so it seems like a config issue on my end but I've no idea what would cause this.
Was this page helpful?