'fieldMap' property is missing in 'QueryOptions' typings
See original GitHub issueIssue Description
What are you doing?
const query = `any query here`;
const result = await sequelize.query(query, {
replacements: {
...
},
type: QueryTypes.SELECT,
fieldMap: {
...
}
});
What do you expect to happen?
There are no compilation errors.
What is actually happening?
error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type '{ replacements: { groupId: number; offset: number; perPage: number; fromDate: any; toDate: any; }; type: QueryTypes.SELECT; fieldMap: {}' is not assignable to parameter of type 'QueryOptions | QueryOptionsWithType<QueryTypes.RAW>'.
Object literal may only specify known properties, and 'fieldMap' does not exist in type 'QueryOptions | QueryOptionsWithType<QueryTypes.RAW>'.
Additional context

Environment
- Sequelize version: 5.19.8
- Node.js version: 10.16.1
- Operating System: macOS 10.14.6
- TypeScript version: 3.6.4
Issue Template 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.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Missing query for nested property in ElasticSearch
I am trying to write a query that returns all docs which don't have a particular field which is a nested property but...
Read more >Upgrade to v6 - Sequelize
Sequelize v6 is the next major release after v5. Below is a list of breaking changes to help you upgrade.
Read more >Table to Table Missing Field Map Functionality - Esri Community
Solved: Table to Table tool in Modebuilder Missing the Field Map functionality ArcPro 2.6.0. Below is an example on the left is the...
Read more >FieldMap—ArcGIS Pro | Documentation
The FieldMap object provides a field definition and a list of input fields taken from a set of tables or feature classes. Discussion....
Read more >postgres check constraint other table - Fluow
Main content: Missing letters. ... fix(types): added 'fieldMaps' to QueryOptions typings, fix(types): specified 'this' for getters and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Willing to fix this.
@papb - pinged you on sequelize’s slack.