Type models

This commit is contained in:
Chocobozzz 2017-05-22 20:58:25 +02:00
parent 65fcc3119c
commit e02643f32e
76 changed files with 1710 additions and 816 deletions

View file

@ -14,8 +14,14 @@ function getSort (value) {
return [ field, direction ]
}
function addMethodsToModel (model: any, classMethods: Function[], instanceMethods: Function[] = []) {
classMethods.forEach(m => model[m.name] = m)
instanceMethods.forEach(m => model.prototype[m.name] = m)
}
// ---------------------------------------------------------------------------
export {
addMethodsToModel,
getSort
}