File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const HOOKS_KEY = 'sequelize:hooks';
9
9
/**
10
10
* Installs hooks on the specified models
11
11
*/
12
- export function installHooks ( models : Array < ModelCtor > ) : void {
12
+ export function installHooks ( models : ModelCtor [ ] ) : void {
13
13
models . forEach ( model => {
14
14
const hooks = getHooks ( model ) ;
15
15
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const SCOPES_OPTIONS_KEY = 'sequelize:scopes-options';
13
13
/**
14
14
* Resolves scopes and adds them to the specified models
15
15
*/
16
- export function resolveScopes ( models : Array < ModelCtor > ) : void {
16
+ export function resolveScopes ( models : ModelCtor [ ] ) : void {
17
17
models . forEach ( model => {
18
18
resolvesDeprecatedScopes ( model ) ;
19
19
const { getDefaultScope, getScopes} = getScopeOptionsGetters ( model . prototype ) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ function getValidationOnlyOptions(options: SequelizeOptions): SequelizeOptions {
37
37
* Determines models from value
38
38
*/
39
39
export function getModels (
40
- arg : Array < ModelCtor | string > ,
40
+ arg : ( ModelCtor | string ) [ ] ,
41
41
modelMatch : ModelMatch ,
42
42
) : ModelCtor [ ] {
43
43
const hasSupportedExtension = path => [ '.ts' , '.js' ] . indexOf ( extname ( path ) ) !== - 1 ;
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ export class Sequelize extends OriginSequelize {
43
43
addModels ( models : ModelCtor [ ] ) ;
44
44
addModels ( modelPaths : string [ ] ) ;
45
45
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 ) {
48
48
const defaultModelMatch = ( filename , member ) => filename === member ;
49
49
const models = getModels ( arg , modelMatch || this . options . modelMatch || defaultModelMatch ) ;
50
50
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export function Is(validator: (value: any) => any): Function;
16
16
/**
17
17
* Will only allow values, that match the string regex or real regex
18
18
*/
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 ;
20
20
export function Is ( ...args : any [ ] ) : Function {
21
21
22
22
const options : ModelValidateOptions = { } ;
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import {addAttributeOptions} from "../model/column/attribute-service";
3
3
/**
4
4
* Will not allow values, that match the string regex or real regex
5
5
*/
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 {
8
8
9
9
return ( target : any , propertyName : string ) =>
10
10
addAttributeOptions ( target , propertyName , {
You can’t perform that action at this time.
0 commit comments