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

Add SafeString As A Valid Message Type #387

Open ardeliatay opened 1 year ago

ardeliatay commented 1 year ago

Fix Argument of type SafeString' is not assignable to parameter of type 'string' TS error when passing a SafeString to the flash message service methods:

this.flashMessages.success(htmlSafe('Success!'));
// Argument of type SafeString' is not assignable to parameter of type 'string'

This ticket added SafeString as a valid argument to the flash message methods, but currently the type for message is only a string. This PR introduces a Message type for message arguments to include SafeString to align with that behaviour.