Node v16 is EOL, and --module node16 is an awkward target because it doesn't support import attributes, but requires import assertions to import JSON. With #60534, nodenext will advance to support require(esm), so we will want to have a module target that represents Node.js beore require(esm) but after import attributes.
--module node18 will be identical to 5.7's nodenext (except perhaps for the implied --target), and --module node16 will be deprecated in TypeScript 6.0.
Node v16 is EOL, and
--module node16is an awkward target because it doesn't support import attributes, but requires import assertions to import JSON. With #60534,nodenextwill advance to supportrequire(esm), so we will want to have a module target that represents Node.js beorerequire(esm)but after import attributes.--module node18will be identical to 5.7'snodenext(except perhaps for the implied--target), and--module node16will be deprecated in TypeScript 6.0.