hannahhoward / a1atscript

The Angular 2 Polyfill
MIT License
101 stars 7 forks source link

Simplified annotation defs #2

Open nyarly opened 9 years ago

nyarly commented 9 years ago

As is, every annotation needs two closely coupled classes, but there doesn't seem to be a reason for that.

You need the annotation itself and the annotationInjector that does the actual work. The injector tends to be in a class heirarchy, but the annotation doesn't. There isn't any overlap of methods.

Consider unifying these classes - just apply the instatiate method of found annotations as we go.