ngneat / dialog

👻 A simple to use, highly customizable, and powerful modal for Angular Applications
https://ngneat.github.io/dialog/
MIT License
394 stars 38 forks source link

fix: allow nullable values again #122

Closed jacobg213 closed 3 months ago

jacobg213 commented 3 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue #81 is reintroduced when upgrading to TS 5.4+.

Issue Number: #119

What is the new behavior?

The updated typing allows the same behavior we expect today on TS versions below 5.4.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Angular 18 requires TS 5.4+ which breaks the NonNullable type.

This PR replaces NonNullable with Exclude to allow correct typing of ExtractRefProp and fix the issue where opening dialogs containing undefined values throws TS2769 when trying to set the data property.

stackblitz[bot] commented 3 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.