<commit_before>/**
 * Copyright (c) 2016, <NAME>
 * All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

// Note: TypeScript already has built-in definitions for
// Iterable, Iterator, AsyncIterable, and AsyncIterator so they are not
// defined here. However you may need to configure TypeScript to include them.

export var $$iterator: symbol

export function isIterable(obj: any): obj is Iterable<any>

export function isArrayLike(obj: any): obj is { length: number }

export function isCollection(obj: any): obj is Iterable<any> | { length: number }

export function getIterator<TValue>(
  iterable: Iterable<TValue>
): Iterator<TValue>
export function getIterator(iterable: any): void | Iterator<any>

export function getIteratorMethod<TValue>(
  iterable: Iterable<TValue>
): () => Iterator<TValue>
export function getIteratorMethod(iterable: any): void | (() => Iterator<any>)

export function createIterator<TValue>(
  collection: Iterable<TValue>
): Iterator<TValue>
export function createIterator(collection: { length: number }): Iterator<any>
export function createIterator(collection: any): void | Iterator<any>

export function forEach<TValue, TCollection extends Iterable<TValue>>(
  collection: TCollection,
  callbackFn: (value: TValue, index: number, collection: TCollection) => any,
  thisArg?: any
): void
export function forEach<TCollection extends { length: number }>(
  collection: TCollection,
  callbackFn: (value: any, index: number, collection: TCollection) => any,
  thisArg?: any
): void

export var $$asyncIterator: symbol<commit_msg>mark $$iterator and $$asyncIterator as unique (#50)<commit_after>/**
 * Copyright (c) 2016, <NAME>
 * All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

// Note: TypeScript already has built-in definitions for
// Iterable, Iterator, AsyncIterable, and AsyncIterator so they are not
// defined here. However you may need to configure TypeScript to include them.

export const $$iterator: unique symbol

export function isIterable(obj: any): obj is Iterable<any>

export function isArrayLike(obj: any): obj is { length: number }

export function isCollection(obj: any): obj is Iterable<any> | { length: number }

export function getIterator<TValue>(
  iterable: Iterable<TValue>
): Iterator<TValue>
export function getIterator(iterable: any): void | Iterator<any>

export function getIteratorMethod<TValue>(
  iterable: Iterable<TValue>
): () => Iterator<TValue>
export function getIteratorMethod(iterable: any): void | (() => Iterator<any>)

export function createIterator<TValue>(
  collection: Iterable<TValue>
): Iterator<TValue>
export function createIterator(collection: { length: number }): Iterator<any>
export function createIterator(collection: any): void | Iterator<any>

export function forEach<TValue, TCollection extends Iterable<TValue>>(
  collection: TCollection,
  callbackFn: (value: TValue, index: number, collection: TCollection) => any,
  thisArg?: any
): void
export function forEach<TCollection extends { length: number }>(
  collection: TCollection,
  callbackFn: (value: any, index: number, collection: TCollection) => any,
  thisArg?: any
): void

export const $$asyncIterator: unique symbol
{'fraction_non_alphanumeric': 0.10726950354609929, 'fraction_numerical': 0.002955082742316785, 'mean_word_length': 5.702970297029703, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3156919', 'n_tokens_mistral': 950, 'n_tokens_neox': 938, 'n_words': 347}