Skip to content

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.

@modulitos modulitos force-pushed the add-operatorsAliases-support branch from 1584b90 to b451122 Compare November 3, 2017 22:58
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.

2 participants