jayphelps / core-decorators

Library of stage-0 JavaScript decorators (aka ES2016/ES7 decorators but not accurate) inspired by languages that come with built-ins like @​override, @​deprecate, @​autobind, @​mixin and more. Popular with React/Angular, but is framework agnostic.
MIT License
4.52k stars 263 forks source link

Updated for full TypeScript Support #154

Open nonara opened 5 years ago

nonara commented 5 years ago

By: Ron Spickenagel - http://www.github.com/ronspickenagel

nonara commented 5 years ago

Hi Jay! Wanted to let you know that I'm also happy to help maintain and address issues if you'd like the help. Thanks for all the great work. Feel free to reach out at ron@nonara.com or http://twitter.com/ron

nonara commented 5 years ago

I just discovered after several days work that someone converted the whole thing to typescript! Go figure...

That said, here's why I think this is an easier approval:

1) Not ported to new language

2) Small footprint - minimal code changes from original. Nearly everything is preserved, with just a few alterations to accommodate TS

3) Latest TypeScript is more feature rich - current index.d.ts uses modern types and methodology (like overloading)

4) Documentation and typing is setup to support IntelliSense & TSC compiler gives correct suggestions/rejections for using decorators on the wrong types or with wrong arguments

5) Centralized test base that runs on ts-node and babel

Please feel free to ask any questions! Hopefully it will be useful. Changes are marginal, but I recognize that I should have split each up into a separate commit so it's easier to see how each connects. If you'd like me to do that, let me know. I can reset and layer them on.

Cheers Ron