Type models
This commit is contained in:
parent
65fcc3119c
commit
e02643f32e
76 changed files with 1710 additions and 816 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue