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

[objasinterface] Make sure that keys/values/entries are typed to work against class instances too #329

Merged
merged 2 commits into from
Jul 14, 2022

Conversation

somewhatabstract
Copy link
Member

Summary:

Noticed in webapp that some uses are passing a class instance and we should support that. Flow error indicated using an interface rather than object type so that it would match both objects and class instances. So this does that.

Issue: XXX-XXXX

Test plan:

yarn flow

… against class instances too

Noticed in webapp that some uses are passing a class instance and we should support that. Flow error indicated using an interface rather than object type so that it would match both objects and class instances. So this does that.
@somewhatabstract somewhatabstract self-assigned this Jul 14, 2022
@changeset-bot
Copy link

changeset-bot bot commented Jul 14, 2022

🦋 Changeset detected

Latest commit: 0e14da4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@khanacademy/wonder-stuff-core Patch
@khanacademy/wonder-stuff-sentry Patch
@khanacademy/wonder-stuff-server-google Patch
@khanacademy/wonder-stuff-server Patch
@khanacademy/wonder-stuff-testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@somewhatabstract somewhatabstract requested review from benchristel and a team July 14, 2022 19:17
@khan-actions-bot khan-actions-bot requested a review from a team July 14, 2022 19:17
@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/frontend-infra for changes to .changeset/nice-shirts-switch.md, packages/wonder-stuff-core/src/entries.js, packages/wonder-stuff-core/src/keys.js, packages/wonder-stuff-core/src/values.js, packages/wonder-stuff-core/src/__tests__/entries.flowtest.js, packages/wonder-stuff-core/src/__tests__/keys.flowtest.js, packages/wonder-stuff-core/src/__tests__/values.flowtest.js

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@github-actions
Copy link
Contributor

Size Change: 0 B

Total Size: 3.65 kB

ℹ️ View Unchanged
Filename Size
packages/wonder-stuff-core/dist/es/index.browser.js 1.59 kB
packages/wonder-stuff-sentry/dist/es/index.browser.js 1.52 kB
packages/wonder-stuff-testing/dist/es/index.browser.js 540 B

compressed-size-action

Copy link
Contributor

@kevinbarabash kevinbarabash left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for tweaking the Flow types to support class instances. 💚

@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #329 (0e14da4) into main (3b79965) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #329   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           58        58           
  Lines          833       833           
  Branches       229       222    -7     
=========================================
  Hits           833       833           
Impacted Files Coverage Δ
packages/wonder-stuff-core/src/entries.js 100.00% <100.00%> (ø)
packages/wonder-stuff-core/src/keys.js 100.00% <100.00%> (ø)
packages/wonder-stuff-core/src/values.js 100.00% <100.00%> (ø)

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 3b79965...0e14da4. Read the comment docs.

@somewhatabstract somewhatabstract merged commit 753b193 into main Jul 14, 2022
@somewhatabstract somewhatabstract deleted the objasinterface branch July 14, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants