mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:13:31 -06:00
More documentation on the impliedNodeFormat SourceFile field (#49816)
This commit is contained in:
parent
af70f240a1
commit
eb430f27ea
@ -3791,6 +3791,12 @@ namespace ts {
|
||||
* 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.
|
||||
*/
|
||||
impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
|
||||
|
||||
|
||||
@ -2096,6 +2096,12 @@ declare namespace ts {
|
||||
* 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.
|
||||
*/
|
||||
impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
|
||||
}
|
||||
|
||||
@ -2096,6 +2096,12 @@ declare namespace ts {
|
||||
* 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.
|
||||
*/
|
||||
impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user