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

feat(sequelize.d.ts) add operatorsAliases constructor option #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

modulitos
Copy link
Contributor

Resolves #139

*
* Defaults to true
*/
operatorsAliases?: boolean | object;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use a more precise type than object, e.g. an index signature or an interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that creating an interface here would require porting the OperatorAliases into an Typescipt interface, then referencing that interface in our sequelize.d.ts file. Does that seem like a reasonable approach? Here are the operator aliases from the Sequelize source code: https://github.com/sequelize/sequelize/blob/master/lib/operators.js

I was hoping this would have already been done in the other Sequelize type definitions, but I can't seem to find it here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/sequelize/v3/index.d.ts I'm happy to implement this port when I have some time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

They are all here:

export interface WhereOperators {

Should be possible to use a mapped type.

DefinitelyTyped has nothing to do with this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants