Skip to content

Commit

Permalink
refactor(core): document setComponentScope to provide context (#39662)
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
alxhub authored and basherr committed Nov 14, 2020
1 parent a7af172 commit 09c7493
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/render3/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,12 @@ export function ɵɵdefineComponent<T>(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(
Expand Down

0 comments on commit 09c7493

Please sign in to comment.