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

fix(types): adds 'hooks' to CreateOptions #11736

Merged
merged 6 commits into from Jan 21, 2020
Merged

fix(types): adds 'hooks' to CreateOptions #11736

merged 6 commits into from Jan 21, 2020

Conversation

@eratio08
Copy link
Contributor

eratio08 commented Dec 10, 2019

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Adds the missing hooks field to the CreateOptions type mentioned here https://sequelize.org/v5/class/lib/model.js~Model.html#static-method-create

@codecov

This comment has been minimized.

Copy link

codecov bot commented Dec 10, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11736   +/-   ##
=======================================
  Coverage   96.27%   96.27%           
=======================================
  Files          94       94           
  Lines        9203     9203           
=======================================
  Hits         8860     8860           
  Misses        343      343
Impacted Files Coverage Δ
lib/dialects/postgres/connection-manager.js 95.77% <ø> (ø) ⬆️
lib/model.js 96.54% <100%> (ø) ⬆️
lib/dialects/mariadb/data-types.js 100% <100%> (ø) ⬆️
lib/dialects/postgres/data-types.js 96.26% <100%> (ø) ⬆️
lib/query-interface.js 92.19% <100%> (ø) ⬆️
lib/dialects/mysql/data-types.js 98.43% <100%> (ø) ⬆️
lib/dialects/abstract/query-generator.js 97.02% <100%> (ø) ⬆️
... and 1 more

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 669cae4...02f3db3. Read the comment docs.

Copy link
Member

SimonSchick left a comment

Can you instead move the hooks property to a separate interface and let everything that supports the hooks property inherit from it, much cleaner than even more copy/paste.

image

@eratio08 eratio08 requested a review from SimonSchick Dec 12, 2019
Copy link
Member

papb left a comment

Great work, just one request: please rename this HookOptions interface you created to Hookable, makes more sense to me and adheres to the style of other similar interfaces.

@papb papb dismissed SimonSchick’s stale review Jan 16, 2020

Dismissing this review since this request was already addressed

eratio08 added 3 commits Jan 21, 2020
@eratio08 eratio08 requested a review from papb Jan 21, 2020
@papb
papb approved these changes Jan 21, 2020
@papb papb merged commit ba9a2f6 into sequelize:master Jan 21, 2020
4 checks passed
4 checks passed
codecov/patch 100% of diff hit (target 96.27%)
Details
codecov/project 96.27% (+0%) compared to 9115393
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@papb

This comment has been minimized.

Copy link
Member

papb commented Jan 21, 2020

@eratio08 Thank you very much 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.