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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(context): fix generic typing for BindingFilter #2728

Merged
merged 1 commit into from Apr 15, 2019

Conversation

Projects
None yet
2 participants
@raymondfeng
Copy link
Member

commented Apr 11, 2019

Fixes the BindingFilter generic typing as discovered by #2704.

Checklist

馃憠 Read and sign the CLA (Contributor License Agreement) 馃憟

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

馃憠 Check out how to submit a PR 馃憟

@raymondfeng raymondfeng requested a review from bajtos as a code owner Apr 11, 2019

@raymondfeng raymondfeng referenced this pull request Apr 11, 2019

Merged

feat(build): add more TypeScript "strict" checks #2704

4 of 4 tasks complete

@raymondfeng raymondfeng force-pushed the improve-binding-filter-typing branch from dafabbd to 5bb3087 Apr 11, 2019

Show resolved Hide resolved packages/context/src/binding-filter.ts Outdated
Show resolved Hide resolved packages/context/src/binding-filter.ts Outdated

@raymondfeng raymondfeng force-pushed the improve-binding-filter-typing branch 3 times, most recently from e4400dd to 91cae69 Apr 12, 2019

Show resolved Hide resolved packages/context/src/binding-filter.ts Outdated
Show resolved Hide resolved packages/context/src/binding-filter.ts Outdated
* }
* ```
*/
export type BindingFilterGuard<T = unknown> = (

This comment has been minimized.

Copy link
@bajtos

bajtos Apr 15, 2019

Member

AFAICT, this new function type is not accepted by any public API, it's used only internally in Context.prototype.find below. I am not convinced we actually need it. Would you mind reverting this addition?

This comment has been minimized.

Copy link
@raymondfeng

raymondfeng Apr 15, 2019

Author Member

If it's not for backward-compatibility reason, the signature for BindingFilterGuard is better than BindingFilter.

Show resolved Hide resolved packages/context/src/context.ts Outdated
Show resolved Hide resolved packages/context/src/binding-filter.ts Outdated

@bajtos bajtos removed the breaking-change label Apr 15, 2019

@raymondfeng raymondfeng force-pushed the improve-binding-filter-typing branch from 91cae69 to dab46e3 Apr 15, 2019

@raymondfeng raymondfeng requested a review from bajtos Apr 15, 2019

@bajtos

bajtos approved these changes Apr 15, 2019

@raymondfeng raymondfeng force-pushed the improve-binding-filter-typing branch from dab46e3 to a420b0e Apr 15, 2019

@raymondfeng raymondfeng merged commit 372b406 into master Apr 15, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
clahub All contributors have signed the Contributor License Agreement.
Details

@raymondfeng raymondfeng deleted the improve-binding-filter-typing branch Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.