adopted-ember-addons / ember-cli-flash

Simple, highly configurable flash messages for ember-cli
https://www.npmjs.com/package/ember-cli-flash
MIT License
356 stars 113 forks source link

Convert to typescript & octane #390

Closed vlascik closed 4 months ago

vlascik commented 1 year ago

PR rewrites as much as possible to TS & Octane.

There are some TSC/ESLint errors due to FlashObject still extending EmberObject. Not sure what to do about these - if the object is rewritten as an ES6 class, subtle bugs are going to appear due to init() vs constructor timing, and the API will be changed (FlashObjects will have to be created with new, instead of EmberObject.create().

I'm not entirely sure if users of this addon actually create FlashObjects on their own though - if not, and the only usage is through FlassMessages service, the change could be done and tests rewritten without much disruption to consumers.

RobbieTheWagner commented 1 year ago

@vlascik thanks for taking on this work! It is long overdue. I would recommend ignoring lint issues for now. It would be good to get these tests running and see if everything is passing.

NullVoxPopuli commented 4 months ago

Gonna close this since the package is now a v2 addon! thanks @vlascik your work inspired the work that did landed!

vlascik commented 4 months ago

@NullVoxPopuli you know the point of this PR was to turn the code into Typescript, not v2 addon though, right?

As far as I can tell the addon is still in JS.

NullVoxPopuli commented 4 months ago

As far as I can tell the addon is still in JS.

Yes, but everything has type declarations now! 🎉