-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change of modal getData() #378
Comments
Thanks you for your feedback @lweberprb. It's true that it wasn't particularly necessary. I did it to comply with the eslint rule |
Thank you very much for your quick response! A neat change could be a generic Anyhow, thanks for your awesome work! |
@lweberprb Great idea! |
Hi @maximelafarie. Thanks for a great resource in ngx-smart-modal! Did this patch ever go ahead? I don't see a 14.0.3 on npm or in the tags. Thanks! |
Hi @maximelafarie I see that #380 got merged in, and seems to have created a 14.0.2 release in github, but the actions output for semantic release seems to think a release should not have been created. Is that in error? https://github.com/maximelafarie/ngx-smart-modal/actions/runs/6791148890/job/18462433573#step:6:42 Also as there was already a 14.0.2 release in npm it seems to be causing some confusion. |
Hi @trdyer, yes, something strange happened with the I'll make a manual release right now. Once again, thanks a million for your patience, folks! |
I've just released v14.0.3, which includes the @AntLer-24rus fixes. Don't hesitate to give me feedback. |
Hi @maximelafarie, thank you so much for all your amazing work. With v14.0.3, I still see that getData(): unknown and this is causing errors in my build |
Hi @jenniferchau, thank you very much for the kind words. Absolutely, I haven't fixed this for a long time and it's a problem for a lot of people. I'm going to fix it! |
Is there any progress on changing it back to |
Hi, there, sorry, I got married recently and have had a lot going on at the moment which (once again) has made it very difficult for me to refocus. I have two solutions in mind:
public getData(): any {
this.assignComponentDataToModalData(this._componentRef);
return this._data;
}
public getData<T>(): T {
this.assignComponentDataToModalData(this._componentRef);
return this._data as T;
} Tell me what you think is best (in the general interest). I'll include it in the batch of fixes I want to roll out soon. |
Congratulations! Really happy for you! From my perspective the 2nd solution would be the best, as it soemwhat enforces the user to explicity specify a type that is expected to be returned from the |
With the newest version, the return type of
getData()
changed fromany
tounknown
. This should be included in the list of breaking changes. Why was this change necessary in the first place?See: code
The text was updated successfully, but these errors were encountered: