Skip to content
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

feat(modal): set strong typing in componentInstance getter property #2815

Merged
merged 1 commit into from Oct 21, 2019

Conversation

michaeljota
Copy link
Contributor

@michaeljota michaeljota commented Oct 18, 2018

Before submitting a pull request, please make sure you have at least performed the following:

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated any applicable tests.
  • added/updated any applicable API documentation.
  • added/updated any applicable demos.

This should be mostly compatible with current branch. As latest version of this use Angular 6.1 and Angular itself uses TS2.9, I take the liberty to update those dependencies to latest of each branch to be able to use conditional types.

Using conditional types I manage to strong type the componentInstance property only when you open a Component. However by using default types, developers should have the same experience that they currently have, meaning, the componentInstance property is default to any. Regardless that, this could have some breaking scenarios, but please notice that those scenarios should not be working on the first place as this change only typing, and not behavior.

Fix: #2479

@michaeljota michaeljota changed the title Feature/typed modal [Modal] Update typing in componentInstance property Oct 18, 2018
@michaeljota michaeljota changed the title [Modal] Update typing in componentInstance property feat(modal): set strong typing in componentInstance getter property Oct 18, 2018
@michaeljota
Copy link
Contributor Author

@benouat Sorry to bother, any updates on this?

@maxokorokov maxokorokov modified the milestone: 4.1.2 Apr 25, 2019
@gentoo90
Copy link
Contributor

Any news on this?

@mleprince
Copy link

Hello,
any news ?

@michaeljota
Copy link
Contributor Author

I've even forgotten about this.

@maxokorokov
Copy link
Member

@michaeljota ha, we've forgotten too apparently :)

@maxokorokov maxokorokov added this to the 5.1.2 milestone Sep 27, 2019
@michaeljota
Copy link
Contributor Author

@maxokorokov Do you need me to update this?

@maxokorokov
Copy link
Member

@michaeljota if it's not too much trouble to:

  • rebase
  • remove package.json and yarn.lock changes from this PR

I'll merge this in the next release.

@michaeljota
Copy link
Contributor Author

Sure. I will do.

@michaeljota
Copy link
Contributor Author

@maxokorokov Done. Thank you.

@codecov-io
Copy link

Codecov Report

Merging #2815 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2815   +/-   ##
=======================================
  Coverage   91.07%   91.07%           
=======================================
  Files          95       95           
  Lines        2780     2780           
  Branches      516      516           
=======================================
  Hits         2532     2532           
  Misses        189      189           
  Partials       59       59
Flag Coverage Δ
#e2e 55.57% <100%> (ø) ⬆️
#unit 88.15% <100%> (ø) ⬆️
Impacted Files Coverage Δ
src/modal/modal-ref.ts 100% <ø> (ø) ⬆️
src/modal/modal.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a584ad...a4e5a60. Read the comment docs.

Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaeljota thanks!

I just rolled back your changes in the modal-stack.ts, as they're not really necessary.

@maxokorokov maxokorokov merged commit f450a7c into ng-bootstrap:master Oct 21, 2019
@michaeljota
Copy link
Contributor Author

Thanks.

maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this pull request Jan 3, 2020
maxokorokov added a commit that referenced this pull request Jan 3, 2020
maxokorokov added a commit that referenced this pull request Jan 7, 2020
@gentoo90 gentoo90 mentioned this pull request Feb 8, 2020
gentoo90 pushed a commit to gentoo90/ng-bootstrap that referenced this pull request Feb 9, 2020
gentoo90 pushed a commit to gentoo90/ng-bootstrap that referenced this pull request Apr 19, 2021
gentoo90 pushed a commit to gentoo90/ng-bootstrap that referenced this pull request Jan 30, 2022
gentoo90 pushed a commit to gentoo90/ng-bootstrap that referenced this pull request Oct 17, 2023
gentoo90 pushed a commit to gentoo90/ng-bootstrap that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typed NgbModalRef
6 participants