I'm currently navigating a JavaScript codebase that utilizes Sequelize models with documented types specified in TypeScript declaration files (.d.ts
). Within my code, I am utilizing model.update()
to modify certain properties on the object:
To replicate this issue, follow these steps:
import { Model } from "sequelize";
let model: Model<{foo:number,bar:string,baz:boolean}>;
model.update({
// begin typing "foo", "bar", or "baz" and notice
// that suggestions are not appearing.
})
My expectations were that upon typing "foo", "bar", or "baz", suggestions would appear to help complete the fields that I declared in the TModelAttributes
generic argument. Unfortunately, these fields do not display in the suggestions list at all.
Interestingly, if I press Ctrl+Space before typing the key, the expected behavior occurs.
What is the root cause of this issue and what steps can I take to achieve the desired behavior?