impliedNodeFormat

When module is Node16 or NodeNext, this field controls whether the source file in question is an ESNext-output-format file, or a CommonJS-output-format module. This is derived by the module resolver as it looks up the file, since it is derived from either the file extension of the module, or the containing package.json context, and affects both checking and emit.

It is public so that (pre)transformers can set this field, since it switches the builtin node module transform. Generally speaking, if unset, the field is treated as though it is ModuleKind.CommonJS.

Note that this field is only set by the module resolution process when moduleResolution is Node16 or NodeNext, which is implied by the module setting of Node16 or NodeNext, respectively, but may be overriden (eg, by a moduleResolution of node). If so, this field will be unset and source files will be considered to be CommonJS-output-format by the node module transformer and type checker, regardless of extension or context.