From 24e13e0ed62fa42f78adba9ef5f3f138d0b3abc8 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Thu, 12 Nov 2020 16:29:36 -0800 Subject: [PATCH] refactor(core): document setComponentScope to provide context (#39662) `setComponentScope` was previously undocumented. This commit adds a short explanation of what the function does, and adds a link to a doc which explains issues with cycles in more detail. PR Close #39662 --- packages/core/src/render3/definition.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/src/render3/definition.ts b/packages/core/src/render3/definition.ts index 5b528ded1c..f090a13e9e 100644 --- a/packages/core/src/render3/definition.ts +++ b/packages/core/src/render3/definition.ts @@ -352,6 +352,12 @@ export function ɵɵdefineComponent(componentDefinition: { } /** + * Generated next to NgModules to monkey-patch directive and pipe references onto a component's + * definition, when generating a direct reference in the component file would otherwise create an + * import cycle. + * + * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details. + * * @codeGenApi */ export function ɵɵsetComponentScope(