Skip to content

fix(@ngtools/webpack): handle union type with a nullable argument #17077

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

Merged
merged 1 commit into from
Feb 25, 2020
Merged

fix(@ngtools/webpack): handle union type with a nullable argument #17077

merged 1 commit into from
Feb 25, 2020

Conversation

alan-agius4
Copy link
Collaborator

Currently constructor parameters with union types that contains nullable argument are not being converted properly and result in broken behaviour.

With this change we align the ctor-parameters downlevel transformer to be closer to the NGTSC reflector: https://github.com/angular/angular/blob/master/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts#L65-L66

This change should also be synced to ng-packagr.

Closes: #17063
Reference: FW-1883

@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Feb 25, 2020
Currently constructor parameters with union types that contains nullable argument are not being converted properly and result in broken behaviour.

With this change we align the ctor-parameters downlevel transformer to be closer to the NGTSC reflector: https://github.com/angular/angular/blob/master/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts#L65-L66

This change should also be synced to ng-packagr.

Closes: #17063
Reference: FW-1883
@alan-agius4 alan-agius4 removed the request for review from petebacondarwin February 25, 2020 18:00
alan-agius4 added a commit to ng-packagr/ng-packagr that referenced this pull request Feb 25, 2020
Currently constructor parameters with union types that contains nullable argument are not being converted properly and result in broken behaviour.

With this change we align the ctor-parameters downlevel transformer to be closer to the NGTSC reflector: https://github.com/angular/angular/blob/master/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts#L65-L66

More info: angular/angular-cli#17077
@dgp1130 dgp1130 merged commit 826803d into angular:master Feb 25, 2020
@dgp1130
Copy link
Collaborator

dgp1130 commented Feb 25, 2020

Also merged to 9.0.x patch branch.

@alan-agius4 alan-agius4 deleted the union-type-null-ctors branch February 25, 2020 18:46
@petebacondarwin
Copy link
Contributor

🎉

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ivy/ngcc] Fails to inject optional dependency in Angular8 library
5 participants