且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

带有延迟用户模块的身份验证模块

更新时间:2022-12-06 11:57:50

使用forwardRef()只是您的最后选择.或者,考虑将模块之一分成两个或多个部分,以打破循环依赖关系,例如:

Working with forwardRef() should only be your last resort. Alternatively, consider splitting one of the modules into two or more parts to break the circular dependencies, e.g.:

AuthModule进入

  • AuthLoginModule被UserModule导入
  • ValidateAuthModule导入UserModule
  • AuthLoginModule gets imported by the UserModule
  • ValidateAuthModule imports the UserModule

UserModule分为两部分.