there exists docs for esm and typescript separately, both nothing on how to use them together. A best practice documentation for this would be very helpful. In tsconfig.json should for example `"module": "NodeNext",` be used?