WorldMaker/angular-pharkas

Document the "constructor only life"?

WorldMaker opened this issue · 1 comments

At this point it seems that Pharkas style components are generally "constructor only". Add an explicit guide about this style, with tips and tricks? (Such as factoring a huge constructor into smaller pieces.)

I think people can figure this out on their own. It's just like any other function refactoring with the hard parts being making sure that you return things that need to be readonly assigned by the end of the constructor so that the assignment itself is in the constructor to make sure Typescript's heuristics pick up the assignment only happens in the constructor.

That's probably the entire of documented. Having written it now, I don't know where I'd copy it into the existing documentation anyway. So it's here if people need it, in the comments of an issue to close.