mark toArray as deprecated/obsolete
This commit is contained in:
parent
4491427ac7
commit
494c209353
|
@ -590,6 +590,9 @@ export function asArray<T>(x: T | T[]): T[] {
|
|||
return Array.isArray(x) ? x : [x];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use `Array.from` or `[...iter]`
|
||||
*/
|
||||
export function toArray<T>(iterable: IterableIterator<T>): T[] {
|
||||
const result: T[] = [];
|
||||
for (let element of iterable) {
|
||||
|
|
Loading…
Reference in a new issue