factory.d.ts 373 B

12345678910111213141516
  1. /**
  2. * @description
  3. * Создает массив классов на основе массивов данные
  4. *
  5. * @source https://pkolt.ru/this-expression-is-not-constructable
  6. *
  7. * @template T
  8. * @param {any[]} values
  9. * @param {new T} cls
  10. * @returns {T[] | []}
  11. */
  12. export declare function factory<T>(
  13. values: any[],
  14. cls: new (...args: any[]) => T
  15. ): T[] | [];