Closed rse closed 11 years ago
It is technically not possible AFAIK to apply those constraints from within the library itself under runtime (because for instance even through arguments.caller.callee we cannot find out what method it actually was, etc). But perhaps one solution would be to implement a JavaScript linter which applies those ComponentJS checks.
This is now addressed by a companion project: componentjs-tracing https://github.com/rse/componentjs-tracing
ComponentJS technically allows things which organisationally should be outlawed because it breaks the Separation of Concern architecture principle. An example: one easily can grab a value() from a sibling component instead of going through a parent service.