ReadonlyendReadonlyendReadonlyflagsOptionalimpliedWhen 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.
ReadonlykindOptionalmoduleReadonlyparentReadonlyposReadonlystatementsOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileOptionalincludeJsDocComment: booleanOptionalsourceFile: SourceFileOptionalsourceFile: SourceFileLike
lib.d.ts should have a reference comment like
///
If any other file has this comment, it signals not to include lib.d.ts because this containing file is intended to act as a default library.