Skip to content

Commit 2dfa9cf

Browse files
committed
Add comments to StructureIsReused enum
1 parent 5c55fc0 commit 2dfa9cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/compiler/types.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3822,10 +3822,11 @@ namespace ts {
38223822
}
38233823

38243824
/* @internal */
3825+
/** "Structure" refers to the SourceFile graph of a Program linked by module resolutions. */
38253826
export const enum StructureIsReused {
3826-
Not = 0,
3827-
SafeModules = 1 << 0,
3828-
Completely = 1 << 1,
3827+
Not = 0, // The entire Program must be (re)created.
3828+
SafeModules = 1 << 0, // SourceFile objects need to be rediscovered, but module resolutions can be reused.
3829+
Completely = 1 << 1, // SourceFile objects and module resolutions can be reused from an old Program.
38293830
}
38303831

38313832
export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer;

0 commit comments

Comments
 (0)