UNPKG

typeorm

Version:

Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL, MongoDB databases.

32 lines (31 loc) 1.03 kB
import { ObjectLiteral } from "../common/ObjectLiteral"; export declare class OrmUtils { static splitClassesAndStrings<T>(clsesAndStrings: T[] | string[]): [T[], string[]]; static groupBy<T, R>(array: T[], propertyCallback: (item: T) => R): { id: R; items: T[]; }[]; static uniq<T>(array: T[], criteria?: (item: T) => any): T[]; static uniq<T, K extends keyof T>(array: T[], property: K): T[]; static isObject(item: any): boolean; /** * Deep Object.assign. * * @see http://stackoverflow.com/a/34749873 */ static mergeDeep(target: any, ...sources: any[]): any; /** * Deep compare objects. * * @see http://stackoverflow.com/a/1144249 */ static deepCompare(...args: any[]): boolean; /** * Transforms given value into boolean value. */ static toBoolean(value: any): boolean; /** * Composes an object from the given array of keys and values. */ static zipObject(keys: any[], values: any[]): ObjectLiteral; }