Fixed up comments.

This commit is contained in:
Daniel Rosenwasser
2017-06-08 15:01:35 -07:00
parent 86e54ac787
commit af41c28ba9

View File

@@ -451,12 +451,14 @@ namespace ts {
ThisNodeOrAnySubNodesHasError = 1 << 17, // If this node or any of its children had an error
HasAggregatedChildData = 1 << 18, // If we've computed data from children and cached it in this node
// This flag will be set to true when the parser encounters a dynamic import expression so that post-parsing process of module resolution
// 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.
// (hence it is named "PossiblyContainsDynamicImport").
// 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.
// 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.
// 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.
// This flag will be set when the parser encounters a dynamic import expression so that module resolution
// will not have to 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 cleared (hence why it's named "PossiblyContainsDynamicImport").
// During editing, if dynamic import is removed, incremental parsing will *NOT* update this flag. This means that the tree will always be traversed
// during module resolution. However, the removal operation should not occur often and in the case of the
// removal, it is likely that users will add the import anyway.
// The advantage of this approach is its simplicity. For the case of batch compilation,
// we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
/* @internal */
PossiblyContainsDynamicImport = 1 << 19,