From 869397339e9681e901f8b4ebf933aa0da12462f4 Mon Sep 17 00:00:00 2001 From: John Pinkster Date: Wed, 17 May 2017 21:11:35 -0400 Subject: [PATCH] Sequelize - FIX/Paranoid in IncludeOptions In the `IncludeOptions` there is an optional property missing from the definition file that allows you to turn on and off the paranoid functionality from the search. Documentation of functionality: http://docs.sequelizejs.com/manual/tutorial/models-usage.html#including-soft-deleted-records Please fill in this template. - [ ] Use a meaningful title for the pull request. Include the name of the package modified. - [ ] Test the change in your own code. (Compile and run.) - [ ] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request). - [ ] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes). - [ ] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present). Select one of these and delete the others: If adding a new definition: - [ ] The package does not provide its own types, and you can not add them. - [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package. - [ ] Create it with `dts-gen --dt`, not by basing it on an existing project. - [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, and `strictNullChecks` set to `true`. If changing an existing definition: - [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <> - [ ] Increase the version number in the header if appropriate. - [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "../tslint.json" }`. If removing a declaration: - [ ] If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.) - [ ] Delete the package's directory. - [ ] Add it to `notNeededPackages.json`. --- types/sequelize/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index c5974a56d2..c227e13d55 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -3165,6 +3165,12 @@ declare namespace sequelize { * Load further nested related models */ include?: Array | IncludeOptions>; + + /** + * If true, only non-deleted records will be returned. If false, both deleted and non-deleted records will + * be returned. Only applies if `options.paranoid` is true for the model. + */ + paranoid?: boolean; }