Skip to content

Make parentContext optional in ModalOptions type #1784

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 2 commits into from
Feb 16, 2020
Merged

Make parentContext optional in ModalOptions type #1784

merged 2 commits into from
Feb 16, 2020

Conversation

sgarner
Copy link
Contributor

@sgarner sgarner commented Feb 14, 2020

This is a ...

  • TypeScript definition update

What's the background?

In b8a0195 the parentContext field was added to ModalOptions.

Since upgrading to 1.4.11 (which is the first release containing this change), I receive build errors in my TypeScript project on code like the following:

this.$error({ content: 'Error message goes here.' });

It produces a build error because the parentContext property is now required:

Error:(62, 21) TS2345: Argument of type '{ content: string; }' is not assignable to parameter of type 'ModalOptions'.
  Property 'parentContext' is missing in type '{ content: string; }' but required in type 'ModalOptions'.

I don't think it was intentional that this property be required (if it was, that's a breaking change and should have been a major semver bump). So the type definition should make it optional.

@sgarner sgarner requested a review from tangjinzhou February 14, 2020 04:00
@codecov
Copy link

codecov bot commented Feb 14, 2020

Codecov Report

Merging #1784 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1784   +/-   ##
=======================================
  Coverage   88.06%   88.06%           
=======================================
  Files         157      157           
  Lines        5422     5422           
  Branches     1525     1525           
=======================================
  Hits         4775     4775           
  Misses        578      578           
  Partials       69       69

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 f5902ec...8da21a1. Read the comment docs.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2021
@sgarner sgarner deleted the patch-1 branch February 16, 2021 00:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants