File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ function getValidationOnlyOptions(options: SequelizeOptions): SequelizeOptions {
3737 * Determines models from value
3838 */
3939export 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 ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ;
2020export function Is ( ...args : any [ ] ) : Function {
2121
2222 const options : ModelValidateOptions = { } ;
Original file line number Diff line number Diff 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 , {
You can’t perform that action at this time.
0 commit comments