I have my moduleResolution set to NodeNext, and I'm importing an ESM package:
declare const got: import("./types").Got;
export default got;
import got from "got";
Now I think got should be the default export with type Got, but it's not. Typescript tells me it only has a property named default. So I can do got.default.post() but I can't do got.post(). What am I doing wrong here? Why do I have to explicitly specify .default in my code when what I'm doing is importing a default export?
I shall note that (got as any).post() works just fine at runtime, so it seems to be a typescript bug. I'm using Typescript 4.8.4.