Skip to content

Commit af41c28

Browse files
Fixed up comments.
1 parent 86e54ac commit af41c28

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/compiler/types.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,14 @@ namespace ts {
451451
ThisNodeOrAnySubNodesHasError = 1 << 17, // If this node or any of its children had an error
452452
HasAggregatedChildData = 1 << 18, // If we've computed data from children and cached it in this node
453453

454-
// This flag will be set to true when the parser encounters a dynamic import expression so that post-parsing process of module resolution
455-
// will not walk the tree if the flag is not set. However, this flag is just a approximation because once it is set, the flag never gets reset.
456-
// (hence it is named "PossiblyContainsDynamicImport").
457-
// During editing, if dynamic import is remove, incremental parsing will *NOT* update this flag. This will then causes walking of the tree during module resolution.
458-
// However, the removal operation should not occur often and in the case of the removal, it is likely that users will add back the import anyway.
459-
// The advantage of this approach is its simplicity. For the case of batch compilation, we garuntee that users won't have to pay the price of walking the tree if dynamic import isn't used.
454+
// This flag will be set when the parser encounters a dynamic import expression so that module resolution
455+
// will not have to walk the tree if the flag is not set. However, this flag is just a approximation because
456+
// once it is set, the flag never gets cleared (hence why it's named "PossiblyContainsDynamicImport").
457+
// During editing, if dynamic import is removed, incremental parsing will *NOT* update this flag. This means that the tree will always be traversed
458+
// during module resolution. However, the removal operation should not occur often and in the case of the
459+
// removal, it is likely that users will add the import anyway.
460+
// The advantage of this approach is its simplicity. For the case of batch compilation,
461+
// we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
460462
/* @internal */
461463
PossiblyContainsDynamicImport = 1 << 19,
462464

0 commit comments

Comments
 (0)