Skip to content

Commit 9b5aab6

Browse files
committed
style: fix ts-lint errors
1 parent 03aa300 commit 9b5aab6

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/hooks/shared/hooks-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const HOOKS_KEY = 'sequelize:hooks';
99
/**
1010
* Installs hooks on the specified models
1111
*/
12-
export function installHooks(models: Array<ModelCtor>): void {
12+
export function installHooks(models: ModelCtor[]): void {
1313
models.forEach(model => {
1414
const hooks = getHooks(model);
1515

src/scopes/scope-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const SCOPES_OPTIONS_KEY = 'sequelize:scopes-options';
1313
/**
1414
* Resolves scopes and adds them to the specified models
1515
*/
16-
export function resolveScopes(models: Array<ModelCtor>): void {
16+
export function resolveScopes(models: ModelCtor[]): void {
1717
models.forEach(model => {
1818
resolvesDeprecatedScopes(model);
1919
const {getDefaultScope, getScopes} = getScopeOptionsGetters(model.prototype);

src/sequelize/sequelize/sequelize-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function getValidationOnlyOptions(options: SequelizeOptions): SequelizeOptions {
3737
* Determines models from value
3838
*/
3939
export function getModels(
40-
arg: Array<ModelCtor | string>,
40+
arg: (ModelCtor | string)[],
4141
modelMatch: ModelMatch,
4242
): ModelCtor[] {
4343
const hasSupportedExtension = path => ['.ts', '.js'].indexOf(extname(path)) !== -1;

src/sequelize/sequelize/sequelize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class Sequelize extends OriginSequelize {
4343
addModels(models: ModelCtor[]);
4444
addModels(modelPaths: string[]);
4545
addModels(modelPaths: string[], modelMatch?: ModelMatch);
46-
addModels(arg: Array<ModelCtor | string>);
47-
addModels(arg: Array<ModelCtor | string>, modelMatch?: ModelMatch) {
46+
addModels(arg: (ModelCtor | string)[]);
47+
addModels(arg: (ModelCtor | string)[], modelMatch?: ModelMatch) {
4848
const defaultModelMatch = (filename, member) => filename === member;
4949
const models = getModels(arg, modelMatch || this.options.modelMatch || defaultModelMatch);
5050

src/validation/is.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function Is(validator: (value: any) => any): Function;
1616
/**
1717
* Will only allow values, that match the string regex or real regex
1818
*/
19-
export function Is(arg: string | Array<string | RegExp> | RegExp | {msg: string, args: string | Array<string | RegExp> | RegExp}): Function;
19+
export function Is(arg: string | (string | RegExp)[] | RegExp | {msg: string, args: string | (string | RegExp)[] | RegExp}): Function;
2020
export function Is(...args: any[]): Function {
2121

2222
const options: ModelValidateOptions = {};

src/validation/not.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {addAttributeOptions} from "../model/column/attribute-service";
33
/**
44
* Will not allow values, that match the string regex or real regex
55
*/
6-
export function Not(arg: string | Array<string | RegExp> | RegExp |
7-
{msg: string, args: string | Array<string | RegExp> | RegExp}): Function {
6+
export function Not(arg: string | (string | RegExp)[] | RegExp |
7+
{msg: string, args: string | (string | RegExp)[] | RegExp}): Function {
88

99
return (target: any, propertyName: string) =>
1010
addAttributeOptions(target, propertyName, {

0 commit comments

Comments
 (0)