Repository navigation
Closed
Labels
released on @v7type: bugDEPRECATED: replace with the "bug" issue typetypescriptFor issues and PRs. Things that involve typescript, such as typings and intellisense.
Description
Issue Creation Checklist
[x] I have read the contribution guidelines
Bug Description
SSCCE
Here is the link to the SSCCE for this issue: N.A.
What do you expect to happen?
Typescript compilation to work smoothly.
What is actually happening?
There are some type errors from sequelize codebase:
node_modules/sequelize/lib/errors/database/exclusion-constraint-error.ts:23:5 - error TS2322: Type '(DatabaseErrorSubclassOptions & ExclusionConstraintErrorOptions) | {}' is not assignable to type 'DatabaseErrorSubclassOptions & ExclusionConstraintErrorOptions'.
Type '{}' is not assignable to type 'DatabaseErrorSubclassOptions & ExclusionConstraintErrorOptions'.
Type '{}' is missing the following properties from type 'ExclusionConstraintErrorOptions': constraint, fields, table
23 options = options || {};
~~~~~~~
node_modules/sequelize/lib/errors/database/foreign-key-constraint-error.ts:29:5 - error TS2322: Type '(ForeignKeyConstraintErrorOptions & DatabaseErrorSubclassOptions) | {}' is not assignable to type 'ForeignKeyConstraintErrorOptions & DatabaseErrorSubclassOptions'.
Type '{}' is not assignable to type 'ForeignKeyConstraintErrorOptions & DatabaseErrorSubclassOptions'.
Type '{}' is missing the following properties from type 'ForeignKeyConstraintErrorOptions': table, fields, value, index, reltype
29 options = options || {};
~~~~~~~
node_modules/sequelize/lib/errors/database/unknown-constraint-error.ts:23:5 - error TS2322: Type '(UnknownConstraintErrorOptions & DatabaseErrorSubclassOptions) | {}' is not assignable to type 'UnknownConstraintErrorOptions & DatabaseErrorSubclassOptions'.
Type '{}' is not assignable to type 'UnknownConstraintErrorOptions & DatabaseErrorSubclassOptions'.
Type '{}' is missing the following properties from type 'UnknownConstraintErrorOptions': constraint, fields, table
23 options = options || {};
~~~~~~~
Found 3 errors.Additional context
Appeared after the version upgrade: 6.7.0 > 6.14.0
Environment
- Sequelize version: 6.14.0
- Node.js version: 16.13.1
- TypeScript version: 4.3.5
Bug Report Checklist
How does this problem relate to dialects?
- I think this problem happens regardless of the dialect.
- I think this problem happens only for the following dialect(s):
- I don't know, I was using PUT-YOUR-DIALECT-HERE, with connector library version XXX and database version XXX
Would you be willing to resolve this issue by submitting a Pull Request?
- Yes, I have the time and I know how to start.
- Yes, I have the time but I don't know how to start, I would need guidance.
- No, I don't have the time, although I believe I could do it if I had the time...
- No, I don't have the time and I wouldn't even know how to start.
Metadata
Metadata
Labels
released on @v7type: bugDEPRECATED: replace with the "bug" issue typetypescriptFor issues and PRs. Things that involve typescript, such as typings and intellisense.
Activity
[-]Type errors in database errors after upgrade[/-][+]Type errors in database errors code[/+]ephys commentedon Jan 24, 2022
This problem does really exist but it's weird it went unreported. Maybe it was shadowed by
types/lib/errors.d.tswhich wasn't deleted.The fact that tsc is reporting errors in /lib for end-users is also an issue. That's likely due to tsc not being able to map
/libto/dist/libyetI think we should move
/libto/src& make/libthe folder for runnable code again, like it was before. We can then add src to.npmignoreWikiRik commentedon Jan 24, 2022
Can you make a separate PR for this?
github-actions commentedon Feb 7, 2022
🎉 This issue has been resolved in version 7.0.0-alpha.6 🎉
The release is available on:
Your semantic-release bot 📦🚀