You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiler/types.ts
+8-6
Original file line number
Diff line number
Diff line change
@@ -451,12 +451,14 @@ namespace ts {
451
451
ThisNodeOrAnySubNodesHasError=1<<17,// If this node or any of its children had an error
452
452
HasAggregatedChildData=1<<18,// If we've computed data from children and cached it in this node
453
453
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.
0 commit comments