Skip to content

fix(types): deduplicate error typings - #14002

Merged
ephys merged 2 commits into
mainfrom
ephys/14000
Jan 25, 2022
Merged

ephys merged 2 commits into
mainfrom
ephys/14000

Conversation

@ephys

@ephys ephys commented Jan 24, 2022

Copy link
Copy Markdown
Member

Pull Request Checklist

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

Description Of Change

Closes #14000, I hope

This PR deduplicates the typing definitions for Error classes, as types/lib/errors.d.ts wasn't removed and was shadowing lib/errors.
I also fixed issues detected in lib/errors once it wasn't shadowed anymore

@ephys ephys added type: bug DEPRECATED: replace with the "bug" issue type typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. labels Jan 24, 2022
@WikiRik

WikiRik commented Jan 24, 2022

Copy link
Copy Markdown
Member

Just to check, this is compatible with the v6 branch right?

@ephys

ephys commented Jan 24, 2022

Copy link
Copy Markdown
Member Author

It should be. I've aligned the new files with the old typing definitions. But I'll double check that everything that was exported, still is

@WikiRik

WikiRik commented Jan 24, 2022

Copy link
Copy Markdown
Member

I was mostly thinking about files that weren't converted to TS in the v6 branch but I haven't looked at your changes yet.

@ephys

ephys commented Jan 24, 2022

Copy link
Copy Markdown
Member Author

These files were converted to TS just before we stopped the migration for v6 :) https://github.com/sequelize/sequelize/tree/v6/lib/errors

@ephys ephys self-assigned this Jan 24, 2022

@WikiRik WikiRik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

Comment thread lib/errors/aggregate-error.ts Resolved
@github-actions

github-actions Bot commented Feb 7, 2022

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 7.0.0-alpha.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

released on @v7 type: bug DEPRECATED: replace with the "bug" issue type typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type errors in database errors code

3 participants