Closed bodograumann closed 5 years ago
Instead of reusing the prototype of the constructor to be decorated directly, we create a child class and thus keep the whole original class intact.
Previously any metadata on the undecorated module class was lost. Now it lives on in the prototype chain. Cf. https://github.com/rbuckton/reflect-metadata
Fixes #9
All the existing tests pass :smile: Mmh, maybe I should add another one for the specific issue I’m trying to fix here.
Instead of reusing the prototype of the constructor to be decorated directly, we create a child class and thus keep the whole original class intact.
Previously any metadata on the undecorated module class was lost. Now it lives on in the prototype chain. Cf. https://github.com/rbuckton/reflect-metadata
Fixes #9