Skip to content

Why are Ref given as a lambda ? #916

Answered by hasezoey
luzzardik asked this question in Q&A
Discussion options

You must be logged in to vote

Please read the documentation Reference other Classes: Common Problems

small snippits:

If () => is not used, there can be problems when the class (/ variable) is defined after the decorator that requires it.

Because of the order classes are loaded and reordered at runtime, this might result in some references being null / undefined / not existing.

The new () => Class is meant to help with Circular Dependencies, but cannot remove the problems in all cases, see Circular Dependencies for more.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by luzzardik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Qustions about how to use stuff
2 participants
Converted from issue

This discussion was converted from issue #915 on March 06, 2024 13:30.