diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 7704b73049..4de155e6ee 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -10,6 +10,7 @@ // Philippe D'Alva // Carven Zhang // Nikola Vidic +// Florian Oellerich // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -5313,7 +5314,7 @@ declare namespace sequelize { /** * Only retry a query if the error matches one of these strings. */ - match?: string[]; + match?: (string|RegExp|Error)[]; /** * How many times a failing query is automatically retried. Set to 0 to disable retrying on SQL_BUSY error. diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index b1ee85d2fc..eea19959bd 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -1235,7 +1235,7 @@ new Sequelize( { username: 'user', password: 'pass', retry: { - match: ['failed'], + match: ['failed', /failed/i, Sequelize.ForeignKeyConstraintError], max: 3 }, typeValidation: true