Skip to content

Commit

Permalink
docs: clarify how type-only imports can be used to avoid NG3003 (#42491)
Browse files Browse the repository at this point in the history
Since #42453, type-only imports are not considered for cyclic imports.
This commit adds a note to the NG3003 error documentation to mention
using type-only imports to avoid the error.

PR Close #42491
  • Loading branch information
JoostK authored and thePunderWoman committed Jun 7, 2021
1 parent f4c55e4 commit 64c8027
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aio/content/errors/NG3003.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ component being compiled. Here are some ideas for fixing the problem:
that is stored in an independent file that can be imported to both dependent files without
causing an import cycle.
* Move the classes that reference each other into the same file, to avoid any imports between them.
* Convert import statements to type-only imports (using `import type` syntax) if the imported declarations
are only used as types, as type-only imports do not contribute to cycles.

0 comments on commit 64c8027

Please sign in to comment.