mihaifm / linq

linq.js - LINQ for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enumerable.from is missing Array[] overload.

shtse8 opened this issue · comments

for the current implementation

  export function from(): IEnumerable<unknown>;
  export function from<T>(obj: Array<T>): IEnumerable<T>;
  export function from<T>(obj: IEnumerable<T>): IEnumerable<T>;
  export function from(obj: number): IEnumerable<number>;
  export function from(obj: boolean): IEnumerable<boolean>;
  export function from(obj: string): IEnumerable<string>;
  export function from<T>(obj: T[]): IEnumerable<T>;
  export function from<T>(obj: Iterator<T>): IEnumerable<T>;
  export function from<T>(obj: { length: number;[x: number]: T; }): IEnumerable<T>;
  export function from<T>(obj: { [key: string]: T }): IEnumerable<{ key: string; value: T }>;
  export function from<T>(obj: Record<PropertyKey, T>): IEnumerable<{ key: string; value: T }>;

it is missing Array<T> overload.

What about the second line of your snippet?

export function from<T>(obj: Array<T>): IEnumerable<T>;