(params: any, type = 'search condition', field?: string)
| 48 | |
| 49 | /** @internal */ |
| 50 | export function validateParams(params: any, type = 'search condition', field?: string): void { |
| 51 | if (Utils.isPrimaryKey(params) || Utils.isEntity(params)) { |
| 52 | return; |
| 53 | } |
| 54 | |
| 55 | if (Array.isArray(params)) { |
| 56 | return params.forEach(item => validateParams(item, type, field)); |
| 57 | } |
| 58 | |
| 59 | if (Utils.isPlainObject(params)) { |
| 60 | Object.keys(params).forEach(k => validateParams(params[k], type, k)); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | /** @internal */ |
| 65 | export function validatePrimaryKey<T>(entity: EntityData<T>, meta: EntityMetadata<T>): void { |
no test coverage detected