From d7f165d3f2def6a0e4cc2aa2a09b1bcd7cf7fd58 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:09:29 +0100 Subject: [PATCH 1/3] feat: add python itertools harvest 1 --- docs/non-php-api-signatures.snapshot | 25 + src/python/_helpers/_itertools.ts | 358 +++ src/python/index.ts | 1 + src/python/itertools/accumulate.ts | 14 + src/python/itertools/batched.ts | 11 + src/python/itertools/chain.ts | 11 + src/python/itertools/combinations.ts | 11 + .../combinations_with_replacement.ts | 11 + src/python/itertools/compress.ts | 11 + src/python/itertools/index.ts | 11 + src/python/itertools/islice.ts | 13 + src/python/itertools/pairwise.ts | 11 + src/python/itertools/permutations.ts | 11 + src/python/itertools/product.ts | 11 + src/python/itertools/zip_longest.ts | 11 + src/rosetta.yml | 31 + .../python/itertools/accumulate.vitest.ts | 64 + .../python/itertools/batched.vitest.ts | 48 + .../python/itertools/chain.vitest.ts | 48 + .../python/itertools/combinations.vitest.ts | 48 + .../combinations_with_replacement.vitest.ts | 48 + .../python/itertools/compress.vitest.ts | 48 + .../python/itertools/islice.vitest.ts | 64 + .../python/itertools/pairwise.vitest.ts | 48 + .../python/itertools/permutations.vitest.ts | 48 + .../python/itertools/product.vitest.ts | 48 + .../python/itertools/zip_longest.vitest.ts | 48 + test/parity/lib/languages/python.ts | 21 +- .../util/python-itertools-harvest-1.vitest.ts | 45 + test/util/type-contracts.generated.d.ts | 2678 +++++++++-------- website/source/_data/rosetta.yml | 31 + website/source/_data/upstream_surface.yml | 143 +- .../python/_helpers/toIterableArray.html | 772 +++++ .../source/python/itertools/accumulate.html | 258 ++ website/source/python/itertools/batched.html | 190 ++ website/source/python/itertools/chain.html | 142 + .../source/python/itertools/combinations.html | 200 ++ .../combinations_with_replacement.html | 214 ++ website/source/python/itertools/compress.html | 254 ++ website/source/python/itertools/index.html | 8 + website/source/python/itertools/islice.html | 250 ++ website/source/python/itertools/pairwise.html | 156 + .../source/python/itertools/permutations.html | 218 ++ website/source/python/itertools/product.html | 288 ++ .../source/python/itertools/zip_longest.html | 230 ++ 45 files changed, 5834 insertions(+), 1376 deletions(-) create mode 100644 src/python/_helpers/_itertools.ts create mode 100644 src/python/itertools/accumulate.ts create mode 100644 src/python/itertools/batched.ts create mode 100644 src/python/itertools/chain.ts create mode 100644 src/python/itertools/combinations.ts create mode 100644 src/python/itertools/combinations_with_replacement.ts create mode 100644 src/python/itertools/compress.ts create mode 100644 src/python/itertools/index.ts create mode 100644 src/python/itertools/islice.ts create mode 100644 src/python/itertools/pairwise.ts create mode 100644 src/python/itertools/permutations.ts create mode 100644 src/python/itertools/product.ts create mode 100644 src/python/itertools/zip_longest.ts create mode 100644 test/generated/python/itertools/accumulate.vitest.ts create mode 100644 test/generated/python/itertools/batched.vitest.ts create mode 100644 test/generated/python/itertools/chain.vitest.ts create mode 100644 test/generated/python/itertools/combinations.vitest.ts create mode 100644 test/generated/python/itertools/combinations_with_replacement.vitest.ts create mode 100644 test/generated/python/itertools/compress.vitest.ts create mode 100644 test/generated/python/itertools/islice.vitest.ts create mode 100644 test/generated/python/itertools/pairwise.vitest.ts create mode 100644 test/generated/python/itertools/permutations.vitest.ts create mode 100644 test/generated/python/itertools/product.vitest.ts create mode 100644 test/generated/python/itertools/zip_longest.vitest.ts create mode 100644 test/util/python-itertools-harvest-1.vitest.ts create mode 100644 website/source/python/_helpers/toIterableArray.html create mode 100644 website/source/python/itertools/accumulate.html create mode 100644 website/source/python/itertools/batched.html create mode 100644 website/source/python/itertools/chain.html create mode 100644 website/source/python/itertools/combinations.html create mode 100644 website/source/python/itertools/combinations_with_replacement.html create mode 100644 website/source/python/itertools/compress.html create mode 100644 website/source/python/itertools/index.html create mode 100644 website/source/python/itertools/islice.html create mode 100644 website/source/python/itertools/pairwise.html create mode 100644 website/source/python/itertools/permutations.html create mode 100644 website/source/python/itertools/product.html create mode 100644 website/source/python/itertools/zip_longest.html diff --git a/docs/non-php-api-signatures.snapshot b/docs/non-php-api-signatures.snapshot index 4d463e254f..52a229997f 100644 --- a/docs/non-php-api-signatures.snapshot +++ b/docs/non-php-api-signatures.snapshot @@ -280,6 +280,20 @@ src/python/_helpers/_calendar.ts :: export function normalizeWeekWidth(value: un src/python/_helpers/_calendar.ts :: export function pythonWeekday(year: number, month: number, day: number): number src/python/_helpers/_calendar.ts :: export function timeTupleToUnixSeconds( year: number, month: number, day: number, hour: number, minute: number, second: number, ): number src/python/_helpers/_calendar.ts :: export function toCalendarInteger(value: unknown, functionName: string): number +src/python/_helpers/_itertools.ts :: export function itertoolsAccumulate( iterable: unknown, func: ((accumulator: unknown, value: unknown) => unknown) | undefined, ): unknown[] +src/python/_helpers/_itertools.ts :: export function itertoolsBatched(iterable: unknown, n: unknown): unknown[][] +src/python/_helpers/_itertools.ts :: export function itertoolsChain(iterables: unknown[]): unknown[] +src/python/_helpers/_itertools.ts :: export function itertoolsCombinations(iterable: unknown, r: unknown): unknown[][] +src/python/_helpers/_itertools.ts :: export function itertoolsCombinationsWithReplacement(iterable: unknown, r: unknown): unknown[][] +src/python/_helpers/_itertools.ts :: export function itertoolsCompress(data: unknown, selectors: unknown): unknown[] +src/python/_helpers/_itertools.ts :: export function itertoolsIslice(iterable: unknown, args: unknown[]): unknown[] +src/python/_helpers/_itertools.ts :: export function itertoolsPairwise(iterable: unknown): unknown[][] +src/python/_helpers/_itertools.ts :: export function itertoolsPermutations(iterable: unknown, r?: unknown): unknown[][] +src/python/_helpers/_itertools.ts :: export function itertoolsProduct(args: unknown[]): unknown[][] +src/python/_helpers/_itertools.ts :: export function itertoolsZipLongest(args: unknown[]): unknown[][] +src/python/_helpers/_itertools.ts :: export function parseProductArgs(args: unknown[]): { iterables: unknown[]; repeat: number } +src/python/_helpers/_itertools.ts :: export function parseZipLongestArgs(args: unknown[]): { iterables: unknown[]; fillvalue: unknown } +src/python/_helpers/_itertools.ts :: export function toIterableArray(iterable: unknown, functionName: string): unknown[] src/python/_helpers/_operator.ts :: export function fromPythonInteger(value: bigint, functionName: string): number src/python/_helpers/_operator.ts :: export function isNumericLike(value: unknown): value is NumericLike src/python/_helpers/_operator.ts :: export function pythonAbs(value: unknown, functionName: string): number @@ -336,6 +350,17 @@ src/python/calendar/weekday.ts :: export function weekday(year: unknown, month: src/python/calendar/weekheader.ts :: export function weekheader(width: unknown): string src/python/difflib/get_close_matches.ts :: export function get_close_matches( word: string, possibilities: string[] | unknown, n: number = 3, cutoff: number = 0.6, ): string[] src/python/difflib/ndiff.ts :: export function ndiff( a: string[] | unknown, b: string[] | unknown, linejunk: LineJunkPredicate = null, charjunk: CharJunkPredicate = isCharacterJunk, ): string[] +src/python/itertools/accumulate.ts :: export function accumulate(iterable: unknown, func?: (accumulator: unknown, value: unknown) => unknown): unknown[] +src/python/itertools/batched.ts :: export function batched(iterable: unknown, n: unknown): unknown[][] +src/python/itertools/chain.ts :: export function chain(...iterables: unknown[]): unknown[] +src/python/itertools/combinations.ts :: export function combinations(iterable: unknown, r: unknown): unknown[][] +src/python/itertools/combinations_with_replacement.ts :: export function combinations_with_replacement(iterable: unknown, r: unknown): unknown[][] +src/python/itertools/compress.ts :: export function compress(data: unknown, selectors: unknown): unknown[] +src/python/itertools/islice.ts :: export function islice(iterable: unknown, ...args: unknown[]): unknown[] +src/python/itertools/pairwise.ts :: export function pairwise(iterable: unknown): unknown[][] +src/python/itertools/permutations.ts :: export function permutations(iterable: unknown, r?: unknown): unknown[][] +src/python/itertools/product.ts :: export function product(...args: unknown[]): unknown[][] +src/python/itertools/zip_longest.ts :: export function zip_longest(...args: unknown[]): unknown[][] src/python/math/acos.ts :: export function acos(x: number): number src/python/math/acosh.ts :: export function acosh(x: number): number src/python/math/asin.ts :: export function asin(x: number): number diff --git a/src/python/_helpers/_itertools.ts b/src/python/_helpers/_itertools.ts new file mode 100644 index 0000000000..4e501e2483 --- /dev/null +++ b/src/python/_helpers/_itertools.ts @@ -0,0 +1,358 @@ +import { pythonAdd, pythonTruth } from './_operator.ts' + +type IterableOptions = { + fillvalue?: unknown +} + +type RepeatOptions = { + repeat?: unknown +} + +export function toIterableArray(iterable: unknown, functionName: string): unknown[] { + if (Array.isArray(iterable)) { + return [...iterable] + } + + if (typeof iterable === 'string') { + return [...iterable] + } + + if (isIterable(iterable)) { + return Array.from(iterable) + } + + throw new TypeError(`${functionName}() expected an iterable`) +} + +export function parseZipLongestArgs(args: unknown[]): { iterables: unknown[]; fillvalue: unknown } { + if (args.length === 0) { + return { iterables: [], fillvalue: null } + } + + const options = extractIterableOptions(args[args.length - 1]) + if (!options) { + return { iterables: args, fillvalue: null } + } + + return { + iterables: args.slice(0, -1), + fillvalue: options.fillvalue ?? null, + } +} + +export function parseProductArgs(args: unknown[]): { iterables: unknown[]; repeat: number } { + if (args.length === 0) { + return { iterables: [], repeat: 1 } + } + + const options = extractRepeatOptions(args[args.length - 1]) + if (!options) { + return { iterables: args, repeat: 1 } + } + + return { + iterables: args.slice(0, -1), + repeat: toNonNegativeInteger(options.repeat ?? 1, 'product'), + } +} + +export function itertoolsAccumulate( + iterable: unknown, + func: ((accumulator: unknown, value: unknown) => unknown) | undefined, +): unknown[] { + const values = toIterableArray(iterable, 'accumulate') + if (values.length === 0) { + return [] + } + + const callback = func ?? defaultAccumulateStep + const result = [values[0]] + for (let index = 1; index < values.length; index += 1) { + result.push(callback(result[result.length - 1], values[index])) + } + return result +} + +export function itertoolsBatched(iterable: unknown, n: unknown): unknown[][] { + const values = toIterableArray(iterable, 'batched') + const batchSize = toPositiveInteger(n, 'batched', 'n must be at least one') + const result: unknown[][] = [] + + for (let index = 0; index < values.length; index += batchSize) { + result.push(values.slice(index, index + batchSize)) + } + + return result +} + +export function itertoolsChain(iterables: unknown[]): unknown[] { + return iterables.flatMap((iterable) => toIterableArray(iterable, 'chain')) +} + +export function itertoolsCompress(data: unknown, selectors: unknown): unknown[] { + const values = toIterableArray(data, 'compress') + const masks = toIterableArray(selectors, 'compress') + const result: unknown[] = [] + + for (let index = 0; index < values.length && index < masks.length; index += 1) { + if (pythonTruth(masks[index])) { + result.push(values[index]) + } + } + + return result +} + +export function itertoolsIslice(iterable: unknown, args: unknown[]): unknown[] { + const values = toIterableArray(iterable, 'islice') + const { start, stop, step } = parseSliceArgs(args) + const result: unknown[] = [] + + for (let index = start; index < stop && index < values.length; index += step) { + result.push(values[index]) + } + + return result +} + +export function itertoolsPairwise(iterable: unknown): unknown[][] { + const values = toIterableArray(iterable, 'pairwise') + const result: unknown[][] = [] + + for (let index = 0; index + 1 < values.length; index += 1) { + result.push([values[index], values[index + 1]]) + } + + return result +} + +export function itertoolsZipLongest(args: unknown[]): unknown[][] { + const { iterables, fillvalue } = parseZipLongestArgs(args) + const pools = iterables.map((iterable) => toIterableArray(iterable, 'zip_longest')) + const width = pools.reduce((max, pool) => Math.max(max, pool.length), 0) + const result: unknown[][] = [] + + for (let row = 0; row < width; row += 1) { + result.push(pools.map((pool) => (row < pool.length ? pool[row] : fillvalue))) + } + + return result +} + +export function itertoolsCombinations(iterable: unknown, r: unknown): unknown[][] { + const pool = toIterableArray(iterable, 'combinations') + const size = toNonNegativeInteger(r, 'combinations') + const result: unknown[][] = [] + + buildCombinations(pool, size, 0, [], result) + return result +} + +export function itertoolsCombinationsWithReplacement(iterable: unknown, r: unknown): unknown[][] { + const pool = toIterableArray(iterable, 'combinations_with_replacement') + const size = toNonNegativeInteger(r, 'combinations_with_replacement') + const result: unknown[][] = [] + + if (size === 0) { + return [[]] + } + if (pool.length === 0) { + return [] + } + + buildCombinationsWithReplacement(pool, size, 0, [], result) + return result +} + +export function itertoolsPermutations(iterable: unknown, r?: unknown): unknown[][] { + const pool = toIterableArray(iterable, 'permutations') + const size = r === undefined ? pool.length : toNonNegativeInteger(r, 'permutations') + const result: unknown[][] = [] + + if (size > pool.length) { + return [] + } + + buildPermutations(pool, size, [], new Set(), result) + return result +} + +export function itertoolsProduct(args: unknown[]): unknown[][] { + const { iterables, repeat } = parseProductArgs(args) + const basePools = iterables.map((iterable) => toIterableArray(iterable, 'product')) + const pools = + repeat === 1 + ? basePools + : Array.from({ length: repeat }, () => basePools).flatMap((poolSet) => poolSet.map((pool) => [...pool])) + + if (pools.length === 0) { + return [[]] + } + if (pools.some((pool) => pool.length === 0)) { + return [] + } + + const result: unknown[][] = [] + buildProduct(pools, 0, [], result) + return result +} + +function defaultAccumulateStep(left: unknown, right: unknown): unknown { + return pythonAdd(left, right, 'accumulate') +} + +function parseSliceArgs(args: unknown[]): { start: number; stop: number; step: number } { + if (args.length === 0) { + throw new TypeError("islice() missing required argument 'stop'") + } + if (args.length > 3) { + throw new TypeError(`islice expected at most 4 arguments, got ${args.length + 1}`) + } + + let start = 0 + let stop = 0 + let step = 1 + + if (args.length === 1) { + stop = toNonNegativeInteger(args[0], 'islice') + } else { + start = toNonNegativeInteger(args[0], 'islice') + stop = toNonNegativeInteger(args[1], 'islice') + if (args.length === 3) { + step = toPositiveInteger(args[2], 'islice', 'step for islice() must be a positive integer or None') + } + } + + return { start, stop, step } +} + +function buildCombinations( + pool: unknown[], + size: number, + start: number, + current: unknown[], + result: unknown[][], +): void { + if (current.length === size) { + result.push([...current]) + return + } + + for (let index = start; index <= pool.length - (size - current.length); index += 1) { + current.push(pool[index]) + buildCombinations(pool, size, index + 1, current, result) + current.pop() + } +} + +function buildCombinationsWithReplacement( + pool: unknown[], + size: number, + start: number, + current: unknown[], + result: unknown[][], +): void { + if (current.length === size) { + result.push([...current]) + return + } + + for (let index = start; index < pool.length; index += 1) { + current.push(pool[index]) + buildCombinationsWithReplacement(pool, size, index, current, result) + current.pop() + } +} + +function buildPermutations( + pool: unknown[], + size: number, + current: unknown[], + usedIndexes: Set, + result: unknown[][], +): void { + if (current.length === size) { + result.push([...current]) + return + } + + for (let index = 0; index < pool.length; index += 1) { + if (usedIndexes.has(index)) { + continue + } + usedIndexes.add(index) + current.push(pool[index]) + buildPermutations(pool, size, current, usedIndexes, result) + current.pop() + usedIndexes.delete(index) + } +} + +function buildProduct(pools: unknown[][], index: number, current: unknown[], result: unknown[][]): void { + if (index >= pools.length) { + result.push([...current]) + return + } + + const pool = pools[index] ?? [] + for (const value of pool) { + current.push(value) + buildProduct(pools, index + 1, current, result) + current.pop() + } +} + +function toPositiveInteger(value: unknown, functionName: string, message?: string): number { + const integer = toNonNegativeInteger(value, functionName) + if (integer < 1) { + throw new Error(message ?? `${functionName}() expected a positive integer`) + } + return integer +} + +function toNonNegativeInteger(value: unknown, functionName: string): number { + if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) { + throw new TypeError(`${functionName}() expected a non-negative integer`) + } + + return value +} + +function isIterable(value: unknown): value is Iterable { + return ( + (typeof value === 'object' || typeof value === 'function') && + value !== null && + Symbol.iterator in value && + typeof value[Symbol.iterator] === 'function' + ) +} + +function extractIterableOptions(value: unknown): IterableOptions | null { + if (!isPlainObject(value)) { + return null + } + + const keys = Object.keys(value) + if (keys.length === 0 || keys.some((key) => key !== 'fillvalue')) { + return null + } + + return value +} + +function extractRepeatOptions(value: unknown): RepeatOptions | null { + if (!isPlainObject(value)) { + return null + } + + const keys = Object.keys(value) + if (keys.length === 0 || keys.some((key) => key !== 'repeat')) { + return null + } + + return value +} + +function isPlainObject(value: unknown): value is { [key: string]: unknown } { + return typeof value === 'object' && value !== null && Object.getPrototypeOf(value) === Object.prototype +} diff --git a/src/python/index.ts b/src/python/index.ts index 141723c1df..4e4e304cce 100644 --- a/src/python/index.ts +++ b/src/python/index.ts @@ -1,5 +1,6 @@ export * as calendar from './calendar/index.ts' export * as difflib from './difflib/index.ts' +export * as itertools from './itertools/index.ts' export * as math from './math/index.ts' export * as operator from './operator/index.ts' export * as re from './re/index.ts' diff --git a/src/python/itertools/accumulate.ts b/src/python/itertools/accumulate.ts new file mode 100644 index 0000000000..ced7e9575f --- /dev/null +++ b/src/python/itertools/accumulate.ts @@ -0,0 +1,14 @@ +import { itertoolsAccumulate } from '../_helpers/_itertools.ts' + +export function accumulate(iterable: unknown, func?: (accumulator: unknown, value: unknown) => unknown): unknown[] { + // discuss at: https://locutus.io/python/itertools/accumulate/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // note 1: Materializes Python's lazy iterator into a plain array of intermediate values. + // example 1: accumulate([1, 2, 3, 4]) + // returns 1: [1, 3, 6, 10] + // example 2: accumulate(['a', 'b', 'c']) + // returns 2: ['a', 'ab', 'abc'] + + return itertoolsAccumulate(iterable, func) +} diff --git a/src/python/itertools/batched.ts b/src/python/itertools/batched.ts new file mode 100644 index 0000000000..838b8d608f --- /dev/null +++ b/src/python/itertools/batched.ts @@ -0,0 +1,11 @@ +import { itertoolsBatched } from '../_helpers/_itertools.ts' + +export function batched(iterable: unknown, n: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/batched/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: batched([1, 2, 3, 4, 5], 2) + // returns 1: [[1, 2], [3, 4], [5]] + + return itertoolsBatched(iterable, n) +} diff --git a/src/python/itertools/chain.ts b/src/python/itertools/chain.ts new file mode 100644 index 0000000000..ec8b070e45 --- /dev/null +++ b/src/python/itertools/chain.ts @@ -0,0 +1,11 @@ +import { itertoolsChain } from '../_helpers/_itertools.ts' + +export function chain(...iterables: unknown[]): unknown[] { + // discuss at: https://locutus.io/python/itertools/chain/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: chain([1, 2], [3, 4], [5]) + // returns 1: [1, 2, 3, 4, 5] + + return itertoolsChain(iterables) +} diff --git a/src/python/itertools/combinations.ts b/src/python/itertools/combinations.ts new file mode 100644 index 0000000000..4248dcaac7 --- /dev/null +++ b/src/python/itertools/combinations.ts @@ -0,0 +1,11 @@ +import { itertoolsCombinations } from '../_helpers/_itertools.ts' + +export function combinations(iterable: unknown, r: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/combinations/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: combinations(['A', 'B', 'C'], 2) + // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'C']] + + return itertoolsCombinations(iterable, r) +} diff --git a/src/python/itertools/combinations_with_replacement.ts b/src/python/itertools/combinations_with_replacement.ts new file mode 100644 index 0000000000..7e3ba300f3 --- /dev/null +++ b/src/python/itertools/combinations_with_replacement.ts @@ -0,0 +1,11 @@ +import { itertoolsCombinationsWithReplacement } from '../_helpers/_itertools.ts' + +export function combinations_with_replacement(iterable: unknown, r: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/combinations_with_replacement/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: combinations_with_replacement(['A', 'B', 'C'], 2) + // returns 1: [['A', 'A'], ['A', 'B'], ['A', 'C'], ['B', 'B'], ['B', 'C'], ['C', 'C']] + + return itertoolsCombinationsWithReplacement(iterable, r) +} diff --git a/src/python/itertools/compress.ts b/src/python/itertools/compress.ts new file mode 100644 index 0000000000..9f64e4c962 --- /dev/null +++ b/src/python/itertools/compress.ts @@ -0,0 +1,11 @@ +import { itertoolsCompress } from '../_helpers/_itertools.ts' + +export function compress(data: unknown, selectors: unknown): unknown[] { + // discuss at: https://locutus.io/python/itertools/compress/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: compress(['A', 'B', 'C', 'D'], [1, 0, 1, 0]) + // returns 1: ['A', 'C'] + + return itertoolsCompress(data, selectors) +} diff --git a/src/python/itertools/index.ts b/src/python/itertools/index.ts new file mode 100644 index 0000000000..2fe61b3519 --- /dev/null +++ b/src/python/itertools/index.ts @@ -0,0 +1,11 @@ +export { accumulate } from './accumulate.ts' +export { batched } from './batched.ts' +export { chain } from './chain.ts' +export { combinations } from './combinations.ts' +export { combinations_with_replacement } from './combinations_with_replacement.ts' +export { compress } from './compress.ts' +export { islice } from './islice.ts' +export { pairwise } from './pairwise.ts' +export { permutations } from './permutations.ts' +export { product } from './product.ts' +export { zip_longest } from './zip_longest.ts' diff --git a/src/python/itertools/islice.ts b/src/python/itertools/islice.ts new file mode 100644 index 0000000000..b1f1fab684 --- /dev/null +++ b/src/python/itertools/islice.ts @@ -0,0 +1,13 @@ +import { itertoolsIslice } from '../_helpers/_itertools.ts' + +export function islice(iterable: unknown, ...args: unknown[]): unknown[] { + // discuss at: https://locutus.io/python/itertools/islice/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: islice([0, 1, 2, 3, 4, 5], 1, 6, 2) + // returns 1: [1, 3, 5] + // example 2: islice([0, 1, 2, 3, 4, 5], 4) + // returns 2: [0, 1, 2, 3] + + return itertoolsIslice(iterable, args) +} diff --git a/src/python/itertools/pairwise.ts b/src/python/itertools/pairwise.ts new file mode 100644 index 0000000000..9dac4d52ec --- /dev/null +++ b/src/python/itertools/pairwise.ts @@ -0,0 +1,11 @@ +import { itertoolsPairwise } from '../_helpers/_itertools.ts' + +export function pairwise(iterable: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/pairwise/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: pairwise([1, 2, 3, 4]) + // returns 1: [[1, 2], [2, 3], [3, 4]] + + return itertoolsPairwise(iterable) +} diff --git a/src/python/itertools/permutations.ts b/src/python/itertools/permutations.ts new file mode 100644 index 0000000000..f975861139 --- /dev/null +++ b/src/python/itertools/permutations.ts @@ -0,0 +1,11 @@ +import { itertoolsPermutations } from '../_helpers/_itertools.ts' + +export function permutations(iterable: unknown, r?: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/permutations/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: permutations(['A', 'B', 'C'], 2) + // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'A'], ['B', 'C'], ['C', 'A'], ['C', 'B']] + + return itertoolsPermutations(iterable, r) +} diff --git a/src/python/itertools/product.ts b/src/python/itertools/product.ts new file mode 100644 index 0000000000..512535b923 --- /dev/null +++ b/src/python/itertools/product.ts @@ -0,0 +1,11 @@ +import { itertoolsProduct } from '../_helpers/_itertools.ts' + +export function product(...args: unknown[]): unknown[][] { + // discuss at: https://locutus.io/python/itertools/product/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: product([1, 2], ['A', 'B']) + // returns 1: [[1, 'A'], [1, 'B'], [2, 'A'], [2, 'B']] + + return itertoolsProduct(args) +} diff --git a/src/python/itertools/zip_longest.ts b/src/python/itertools/zip_longest.ts new file mode 100644 index 0000000000..3d872cd08f --- /dev/null +++ b/src/python/itertools/zip_longest.ts @@ -0,0 +1,11 @@ +import { itertoolsZipLongest } from '../_helpers/_itertools.ts' + +export function zip_longest(...args: unknown[]): unknown[][] { + // discuss at: https://locutus.io/python/itertools/zip_longest/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: zip_longest([1, 2, 3], ['A', 'B']) + // returns 1: [[1, 'A'], [2, 'B'], [3, null]] + + return itertoolsZipLongest(args) +} diff --git a/src/rosetta.yml b/src/rosetta.yml index e6e9df3785..58ab5f57a5 100644 --- a/src/rosetta.yml +++ b/src/rosetta.yml @@ -246,6 +246,36 @@ calendar_format_year: calendar_format_string: - python/calendar/formatstring +iterable_accumulate: + - python/itertools/accumulate + +iterable_batch: + - python/itertools/batched + +iterable_chain: + - python/itertools/chain + +iterable_combinations: + - python/itertools/combinations + +iterable_combinations_with_replacement: + - python/itertools/combinations_with_replacement + +iterable_compress: + - python/itertools/compress + +iterable_slice: + - python/itertools/islice + +iterable_pairwise: + - python/itertools/pairwise + +iterable_product: + - python/itertools/product + +iterable_zip_longest: + - python/itertools/zip_longest + integer_square_root: - python/math/isqrt @@ -333,6 +363,7 @@ numeric_type: - lua/math/type list_permutations: + - python/itertools/permutations - ruby/Array/permutation - haskell/list/permutations diff --git a/test/generated/python/itertools/accumulate.vitest.ts b/test/generated/python/itertools/accumulate.vitest.ts new file mode 100644 index 0000000000..b1a28c7a18 --- /dev/null +++ b/test/generated/python/itertools/accumulate.vitest.ts @@ -0,0 +1,64 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/accumulate.ts').accumulate +const __locutus_source_module_url = new URL("../../../../src/python/itertools/accumulate.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "accumulate" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.accumulate = accumulate;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction accumulate(iterable, func) {\n // discuss at: https://locutus.io/python/itertools/accumulate/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // note 1: Materializes Python's lazy iterator into a plain array of intermediate values.\n // example 1: accumulate([1, 2, 3, 4])\n // returns 1: [1, 3, 6, 10]\n // example 2: accumulate(['a', 'b', 'c'])\n // returns 2: ['a', 'ab', 'abc']\n return (0, _itertools_ts_1.itertoolsAccumulate)(iterable, func);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_operator (Locutus helper dependency)\nfunction toPythonNumber(value, functionName) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (typeof value === 'bigint') {\n const numericValue = Number(value);\n if (!Number.isSafeInteger(numericValue)) {\n throw new RangeError(`${functionName}() bigint values must fit within JS safe integer precision`);\n }\n return numericValue;\n }\n throw new TypeError(`${functionName}() expected a numeric value`);\n}\nfunction pythonAdd(left, right, functionName) {\n if (typeof left === 'string' && typeof right === 'string') {\n return left + right;\n }\n if (Array.isArray(left) && Array.isArray(right)) {\n return [...left, ...right];\n }\n return toPythonNumber(left, functionName) + toPythonNumber(right, functionName);\n}\n// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsAccumulate(iterable, func) {\n const values = toIterableArray(iterable, 'accumulate');\n if (values.length === 0) {\n return [];\n }\n const callback = func ?? defaultAccumulateStep;\n const result = [values[0]];\n for (let index = 1; index < values.length; index += 1) {\n result.push(callback(result[result.length - 1], values[index]));\n }\n return result;\n}\nfunction defaultAccumulateStep(left, right) {\n return pythonAdd(left, right, 'accumulate');\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/accumulate (target function module)\nfunction accumulate(iterable, func) {\n // discuss at: https://locutus.io/python/itertools/accumulate/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // note 1: Materializes Python's lazy iterator into a plain array of intermediate values.\n // example 1: accumulate([1, 2, 3, 4])\n // returns 1: [1, 3, 6, 10]\n // example 2: accumulate(['a', 'b', 'c'])\n // returns 2: ['a', 'ab', 'abc']\n return itertoolsAccumulate(iterable, func);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_operator (Locutus helper dependency)\nfunction toPythonNumber(value, functionName) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (typeof value === 'bigint') {\n const numericValue = Number(value);\n if (!Number.isSafeInteger(numericValue)) {\n throw new RangeError(`${functionName}() bigint values must fit within JS safe integer precision`);\n }\n return numericValue;\n }\n throw new TypeError(`${functionName}() expected a numeric value`);\n}\nfunction pythonAdd(left, right, functionName) {\n if (typeof left === 'string' && typeof right === 'string') {\n return left + right;\n }\n if (Array.isArray(left) && Array.isArray(right)) {\n return [...left, ...right];\n }\n return toPythonNumber(left, functionName) + toPythonNumber(right, functionName);\n}\n// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsAccumulate(iterable, func) {\n const values = toIterableArray(iterable, 'accumulate');\n if (values.length === 0) {\n return [];\n }\n const callback = func ?? defaultAccumulateStep;\n const result = [values[0]];\n for (let index = 1; index < values.length; index += 1) {\n result.push(callback(result[result.length - 1], values[index]));\n }\n return result;\n}\nfunction defaultAccumulateStep(left, right) {\n return pythonAdd(left, right, 'accumulate');\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/accumulate (target function module)\nfunction accumulate(iterable, func) {\n // discuss at: https://locutus.io/python/itertools/accumulate/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // note 1: Materializes Python's lazy iterator into a plain array of intermediate values.\n // example 1: accumulate([1, 2, 3, 4])\n // returns 1: [1, 3, 6, 10]\n // example 2: accumulate(['a', 'b', 'c'])\n // returns 2: ['a', 'ab', 'abc']\n return itertoolsAccumulate(iterable, func);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/accumulate.ts (tested in test/generated/python/itertools/accumulate.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [1, 3, 6, 10] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (accumulate: typeof __locutus_source_fn) => { + return accumulate([1, 2, 3, 4]) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) + it('should pass example 2', function () { + const expected = ['a', 'ab', 'abc'] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (accumulate: typeof __locutus_source_fn) => { + return accumulate(['a', 'b', 'c']) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/batched.vitest.ts b/test/generated/python/itertools/batched.vitest.ts new file mode 100644 index 0000000000..959d1f7aba --- /dev/null +++ b/test/generated/python/itertools/batched.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/batched.ts').batched +const __locutus_source_module_url = new URL("../../../../src/python/itertools/batched.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "batched" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.batched = batched;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction batched(iterable, n) {\n // discuss at: https://locutus.io/python/itertools/batched/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: batched([1, 2, 3, 4, 5], 2)\n // returns 1: [[1, 2], [3, 4], [5]]\n return (0, _itertools_ts_1.itertoolsBatched)(iterable, n);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsBatched(iterable, n) {\n const values = toIterableArray(iterable, 'batched');\n const batchSize = toPositiveInteger(n, 'batched', 'n must be at least one');\n const result = [];\n for (let index = 0; index < values.length; index += batchSize) {\n result.push(values.slice(index, index + batchSize));\n }\n return result;\n}\nfunction toPositiveInteger(value, functionName, message) {\n const integer = toNonNegativeInteger(value, functionName);\n if (integer < 1) {\n throw new Error(message ?? `${functionName}() expected a positive integer`);\n }\n return integer;\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/batched (target function module)\nfunction batched(iterable, n) {\n // discuss at: https://locutus.io/python/itertools/batched/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: batched([1, 2, 3, 4, 5], 2)\n // returns 1: [[1, 2], [3, 4], [5]]\n return itertoolsBatched(iterable, n);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsBatched(iterable, n) {\n const values = toIterableArray(iterable, 'batched');\n const batchSize = toPositiveInteger(n, 'batched', 'n must be at least one');\n const result = [];\n for (let index = 0; index < values.length; index += batchSize) {\n result.push(values.slice(index, index + batchSize));\n }\n return result;\n}\nfunction toPositiveInteger(value, functionName, message) {\n const integer = toNonNegativeInteger(value, functionName);\n if (integer < 1) {\n throw new Error(message ?? `${functionName}() expected a positive integer`);\n }\n return integer;\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/batched (target function module)\nfunction batched(iterable, n) {\n // discuss at: https://locutus.io/python/itertools/batched/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: batched([1, 2, 3, 4, 5], 2)\n // returns 1: [[1, 2], [3, 4], [5]]\n return itertoolsBatched(iterable, n);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/batched.ts (tested in test/generated/python/itertools/batched.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [[1, 2], [3, 4], [5]] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (batched: typeof __locutus_source_fn) => { + return batched([1, 2, 3, 4, 5], 2) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/chain.vitest.ts b/test/generated/python/itertools/chain.vitest.ts new file mode 100644 index 0000000000..9a6201b77d --- /dev/null +++ b/test/generated/python/itertools/chain.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/chain.ts').chain +const __locutus_source_module_url = new URL("../../../../src/python/itertools/chain.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "chain" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chain = chain;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction chain(...iterables) {\n // discuss at: https://locutus.io/python/itertools/chain/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: chain([1, 2], [3, 4], [5])\n // returns 1: [1, 2, 3, 4, 5]\n return (0, _itertools_ts_1.itertoolsChain)(iterables);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsChain(iterables) {\n return iterables.flatMap((iterable) => toIterableArray(iterable, 'chain'));\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/chain (target function module)\nfunction chain(...iterables) {\n // discuss at: https://locutus.io/python/itertools/chain/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: chain([1, 2], [3, 4], [5])\n // returns 1: [1, 2, 3, 4, 5]\n return itertoolsChain(iterables);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsChain(iterables) {\n return iterables.flatMap((iterable) => toIterableArray(iterable, 'chain'));\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/chain (target function module)\nfunction chain(...iterables) {\n // discuss at: https://locutus.io/python/itertools/chain/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: chain([1, 2], [3, 4], [5])\n // returns 1: [1, 2, 3, 4, 5]\n return itertoolsChain(iterables);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/chain.ts (tested in test/generated/python/itertools/chain.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [1, 2, 3, 4, 5] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (chain: typeof __locutus_source_fn) => { + return chain([1, 2], [3, 4], [5]) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/combinations.vitest.ts b/test/generated/python/itertools/combinations.vitest.ts new file mode 100644 index 0000000000..6255308bf5 --- /dev/null +++ b/test/generated/python/itertools/combinations.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/combinations.ts').combinations +const __locutus_source_module_url = new URL("../../../../src/python/itertools/combinations.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "combinations" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.combinations = combinations;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction combinations(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/combinations/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: combinations(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'C']]\n return (0, _itertools_ts_1.itertoolsCombinations)(iterable, r);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsCombinations(iterable, r) {\n const pool = toIterableArray(iterable, 'combinations');\n const size = toNonNegativeInteger(r, 'combinations');\n const result = [];\n buildCombinations(pool, size, 0, [], result);\n return result;\n}\nfunction buildCombinations(pool, size, start, current, result) {\n if (current.length === size) {\n result.push([...current]);\n return;\n }\n for (let index = start; index <= pool.length - (size - current.length); index += 1) {\n current.push(pool[index]);\n buildCombinations(pool, size, index + 1, current, result);\n current.pop();\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/combinations (target function module)\nfunction combinations(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/combinations/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: combinations(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'C']]\n return itertoolsCombinations(iterable, r);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsCombinations(iterable, r) {\n const pool = toIterableArray(iterable, 'combinations');\n const size = toNonNegativeInteger(r, 'combinations');\n const result = [];\n buildCombinations(pool, size, 0, [], result);\n return result;\n}\nfunction buildCombinations(pool, size, start, current, result) {\n if (current.length === size) {\n result.push([...current]);\n return;\n }\n for (let index = start; index <= pool.length - (size - current.length); index += 1) {\n current.push(pool[index]);\n buildCombinations(pool, size, index + 1, current, result);\n current.pop();\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/combinations (target function module)\nfunction combinations(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/combinations/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: combinations(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'C']]\n return itertoolsCombinations(iterable, r);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/combinations.ts (tested in test/generated/python/itertools/combinations.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [['A', 'B'], ['A', 'C'], ['B', 'C']] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (combinations: typeof __locutus_source_fn) => { + return combinations(['A', 'B', 'C'], 2) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/combinations_with_replacement.vitest.ts b/test/generated/python/itertools/combinations_with_replacement.vitest.ts new file mode 100644 index 0000000000..96056eeaa5 --- /dev/null +++ b/test/generated/python/itertools/combinations_with_replacement.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/combinations_with_replacement.ts').combinations_with_replacement +const __locutus_source_module_url = new URL("../../../../src/python/itertools/combinations_with_replacement.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "combinations_with_replacement" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.combinations_with_replacement = combinations_with_replacement;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction combinations_with_replacement(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/combinations_with_replacement/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: combinations_with_replacement(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'A'], ['A', 'B'], ['A', 'C'], ['B', 'B'], ['B', 'C'], ['C', 'C']]\n return (0, _itertools_ts_1.itertoolsCombinationsWithReplacement)(iterable, r);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsCombinationsWithReplacement(iterable, r) {\n const pool = toIterableArray(iterable, 'combinations_with_replacement');\n const size = toNonNegativeInteger(r, 'combinations_with_replacement');\n const result = [];\n if (size === 0) {\n return [[]];\n }\n if (pool.length === 0) {\n return [];\n }\n buildCombinationsWithReplacement(pool, size, 0, [], result);\n return result;\n}\nfunction buildCombinationsWithReplacement(pool, size, start, current, result) {\n if (current.length === size) {\n result.push([...current]);\n return;\n }\n for (let index = start; index < pool.length; index += 1) {\n current.push(pool[index]);\n buildCombinationsWithReplacement(pool, size, index, current, result);\n current.pop();\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/combinations_with_replacement (target function module)\nfunction combinations_with_replacement(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/combinations_with_replacement/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: combinations_with_replacement(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'A'], ['A', 'B'], ['A', 'C'], ['B', 'B'], ['B', 'C'], ['C', 'C']]\n return itertoolsCombinationsWithReplacement(iterable, r);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsCombinationsWithReplacement(iterable, r) {\n const pool = toIterableArray(iterable, 'combinations_with_replacement');\n const size = toNonNegativeInteger(r, 'combinations_with_replacement');\n const result = [];\n if (size === 0) {\n return [[]];\n }\n if (pool.length === 0) {\n return [];\n }\n buildCombinationsWithReplacement(pool, size, 0, [], result);\n return result;\n}\nfunction buildCombinationsWithReplacement(pool, size, start, current, result) {\n if (current.length === size) {\n result.push([...current]);\n return;\n }\n for (let index = start; index < pool.length; index += 1) {\n current.push(pool[index]);\n buildCombinationsWithReplacement(pool, size, index, current, result);\n current.pop();\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/combinations_with_replacement (target function module)\nfunction combinations_with_replacement(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/combinations_with_replacement/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: combinations_with_replacement(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'A'], ['A', 'B'], ['A', 'C'], ['B', 'B'], ['B', 'C'], ['C', 'C']]\n return itertoolsCombinationsWithReplacement(iterable, r);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/combinations_with_replacement.ts (tested in test/generated/python/itertools/combinations_with_replacement.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [['A', 'A'], ['A', 'B'], ['A', 'C'], ['B', 'B'], ['B', 'C'], ['C', 'C']] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (combinations_with_replacement: typeof __locutus_source_fn) => { + return combinations_with_replacement(['A', 'B', 'C'], 2) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/compress.vitest.ts b/test/generated/python/itertools/compress.vitest.ts new file mode 100644 index 0000000000..74a7b4c05f --- /dev/null +++ b/test/generated/python/itertools/compress.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/compress.ts').compress +const __locutus_source_module_url = new URL("../../../../src/python/itertools/compress.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "compress" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compress = compress;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction compress(data, selectors) {\n // discuss at: https://locutus.io/python/itertools/compress/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: compress(['A', 'B', 'C', 'D'], [1, 0, 1, 0])\n // returns 1: ['A', 'C']\n return (0, _itertools_ts_1.itertoolsCompress)(data, selectors);\n}" +const __locutus_standalone_ts_code = "function pythonTruth(value) {\n if (value === null || value === undefined) {\n return false;\n }\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'number') {\n return value !== 0;\n }\n if (typeof value === 'bigint') {\n return value !== 0n;\n }\n if (typeof value === 'string') {\n return value.length > 0;\n }\n if (Array.isArray(value)) {\n return value.length > 0;\n }\n if (value instanceof Set || value instanceof Map) {\n return value.size > 0;\n }\n if (isPythonMapping(value)) {\n return Object.keys(value).length > 0;\n }\n return true;\n}\nfunction isPythonMapping(value) {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return false;\n }\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsCompress(data, selectors) {\n const values = toIterableArray(data, 'compress');\n const masks = toIterableArray(selectors, 'compress');\n const result = [];\n for (let index = 0; index < values.length && index < masks.length; index += 1) {\n if (pythonTruth(masks[index])) {\n result.push(values[index]);\n }\n }\n return result;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/compress (target function module)\nfunction compress(data, selectors) {\n // discuss at: https://locutus.io/python/itertools/compress/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: compress(['A', 'B', 'C', 'D'], [1, 0, 1, 0])\n // returns 1: ['A', 'C']\n return itertoolsCompress(data, selectors);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_operator (Locutus helper dependency)\nfunction pythonTruth(value) {\n if (value === null || value === undefined) {\n return false;\n }\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'number') {\n return value !== 0;\n }\n if (typeof value === 'bigint') {\n return value !== 0n;\n }\n if (typeof value === 'string') {\n return value.length > 0;\n }\n if (Array.isArray(value)) {\n return value.length > 0;\n }\n if (value instanceof Set || value instanceof Map) {\n return value.size > 0;\n }\n if (isPythonMapping(value)) {\n return Object.keys(value).length > 0;\n }\n return true;\n}\nfunction isPythonMapping(value) {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return false;\n }\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsCompress(data, selectors) {\n const values = toIterableArray(data, 'compress');\n const masks = toIterableArray(selectors, 'compress');\n const result = [];\n for (let index = 0; index < values.length && index < masks.length; index += 1) {\n if (pythonTruth(masks[index])) {\n result.push(values[index]);\n }\n }\n return result;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/compress (target function module)\nfunction compress(data, selectors) {\n // discuss at: https://locutus.io/python/itertools/compress/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: compress(['A', 'B', 'C', 'D'], [1, 0, 1, 0])\n // returns 1: ['A', 'C']\n return itertoolsCompress(data, selectors);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/compress.ts (tested in test/generated/python/itertools/compress.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = ['A', 'C'] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (compress: typeof __locutus_source_fn) => { + return compress(['A', 'B', 'C', 'D'], [1, 0, 1, 0]) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/islice.vitest.ts b/test/generated/python/itertools/islice.vitest.ts new file mode 100644 index 0000000000..a84735fadf --- /dev/null +++ b/test/generated/python/itertools/islice.vitest.ts @@ -0,0 +1,64 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/islice.ts').islice +const __locutus_source_module_url = new URL("../../../../src/python/itertools/islice.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "islice" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.islice = islice;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction islice(iterable, ...args) {\n // discuss at: https://locutus.io/python/itertools/islice/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: islice([0, 1, 2, 3, 4, 5], 1, 6, 2)\n // returns 1: [1, 3, 5]\n // example 2: islice([0, 1, 2, 3, 4, 5], 4)\n // returns 2: [0, 1, 2, 3]\n return (0, _itertools_ts_1.itertoolsIslice)(iterable, args);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsIslice(iterable, args) {\n const values = toIterableArray(iterable, 'islice');\n const { start, stop, step } = parseSliceArgs(args);\n const result = [];\n for (let index = start; index < stop && index < values.length; index += step) {\n result.push(values[index]);\n }\n return result;\n}\nfunction parseSliceArgs(args) {\n if (args.length === 0) {\n throw new TypeError(\"islice() missing required argument 'stop'\");\n }\n if (args.length > 3) {\n throw new TypeError(`islice expected at most 4 arguments, got ${args.length + 1}`);\n }\n let start = 0;\n let stop = 0;\n let step = 1;\n if (args.length === 1) {\n stop = toNonNegativeInteger(args[0], 'islice');\n }\n else {\n start = toNonNegativeInteger(args[0], 'islice');\n stop = toNonNegativeInteger(args[1], 'islice');\n if (args.length === 3) {\n step = toPositiveInteger(args[2], 'islice', 'step for islice() must be a positive integer or None');\n }\n }\n return { start, stop, step };\n}\nfunction toPositiveInteger(value, functionName, message) {\n const integer = toNonNegativeInteger(value, functionName);\n if (integer < 1) {\n throw new Error(message ?? `${functionName}() expected a positive integer`);\n }\n return integer;\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/islice (target function module)\nfunction islice(iterable, ...args) {\n // discuss at: https://locutus.io/python/itertools/islice/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: islice([0, 1, 2, 3, 4, 5], 1, 6, 2)\n // returns 1: [1, 3, 5]\n // example 2: islice([0, 1, 2, 3, 4, 5], 4)\n // returns 2: [0, 1, 2, 3]\n return itertoolsIslice(iterable, args);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsIslice(iterable, args) {\n const values = toIterableArray(iterable, 'islice');\n const { start, stop, step } = parseSliceArgs(args);\n const result = [];\n for (let index = start; index < stop && index < values.length; index += step) {\n result.push(values[index]);\n }\n return result;\n}\nfunction parseSliceArgs(args) {\n if (args.length === 0) {\n throw new TypeError(\"islice() missing required argument 'stop'\");\n }\n if (args.length > 3) {\n throw new TypeError(`islice expected at most 4 arguments, got ${args.length + 1}`);\n }\n let start = 0;\n let stop = 0;\n let step = 1;\n if (args.length === 1) {\n stop = toNonNegativeInteger(args[0], 'islice');\n }\n else {\n start = toNonNegativeInteger(args[0], 'islice');\n stop = toNonNegativeInteger(args[1], 'islice');\n if (args.length === 3) {\n step = toPositiveInteger(args[2], 'islice', 'step for islice() must be a positive integer or None');\n }\n }\n return { start, stop, step };\n}\nfunction toPositiveInteger(value, functionName, message) {\n const integer = toNonNegativeInteger(value, functionName);\n if (integer < 1) {\n throw new Error(message ?? `${functionName}() expected a positive integer`);\n }\n return integer;\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/islice (target function module)\nfunction islice(iterable, ...args) {\n // discuss at: https://locutus.io/python/itertools/islice/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: islice([0, 1, 2, 3, 4, 5], 1, 6, 2)\n // returns 1: [1, 3, 5]\n // example 2: islice([0, 1, 2, 3, 4, 5], 4)\n // returns 2: [0, 1, 2, 3]\n return itertoolsIslice(iterable, args);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/islice.ts (tested in test/generated/python/itertools/islice.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [1, 3, 5] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (islice: typeof __locutus_source_fn) => { + return islice([0, 1, 2, 3, 4, 5], 1, 6, 2) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) + it('should pass example 2', function () { + const expected = [0, 1, 2, 3] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (islice: typeof __locutus_source_fn) => { + return islice([0, 1, 2, 3, 4, 5], 4) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/pairwise.vitest.ts b/test/generated/python/itertools/pairwise.vitest.ts new file mode 100644 index 0000000000..4c7715f9ab --- /dev/null +++ b/test/generated/python/itertools/pairwise.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/pairwise.ts').pairwise +const __locutus_source_module_url = new URL("../../../../src/python/itertools/pairwise.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "pairwise" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pairwise = pairwise;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction pairwise(iterable) {\n // discuss at: https://locutus.io/python/itertools/pairwise/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: pairwise([1, 2, 3, 4])\n // returns 1: [[1, 2], [2, 3], [3, 4]]\n return (0, _itertools_ts_1.itertoolsPairwise)(iterable);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsPairwise(iterable) {\n const values = toIterableArray(iterable, 'pairwise');\n const result = [];\n for (let index = 0; index + 1 < values.length; index += 1) {\n result.push([values[index], values[index + 1]]);\n }\n return result;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/pairwise (target function module)\nfunction pairwise(iterable) {\n // discuss at: https://locutus.io/python/itertools/pairwise/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: pairwise([1, 2, 3, 4])\n // returns 1: [[1, 2], [2, 3], [3, 4]]\n return itertoolsPairwise(iterable);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsPairwise(iterable) {\n const values = toIterableArray(iterable, 'pairwise');\n const result = [];\n for (let index = 0; index + 1 < values.length; index += 1) {\n result.push([values[index], values[index + 1]]);\n }\n return result;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/pairwise (target function module)\nfunction pairwise(iterable) {\n // discuss at: https://locutus.io/python/itertools/pairwise/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: pairwise([1, 2, 3, 4])\n // returns 1: [[1, 2], [2, 3], [3, 4]]\n return itertoolsPairwise(iterable);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/pairwise.ts (tested in test/generated/python/itertools/pairwise.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [[1, 2], [2, 3], [3, 4]] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (pairwise: typeof __locutus_source_fn) => { + return pairwise([1, 2, 3, 4]) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/permutations.vitest.ts b/test/generated/python/itertools/permutations.vitest.ts new file mode 100644 index 0000000000..529b5894bd --- /dev/null +++ b/test/generated/python/itertools/permutations.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/permutations.ts').permutations +const __locutus_source_module_url = new URL("../../../../src/python/itertools/permutations.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "permutations" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.permutations = permutations;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction permutations(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/permutations/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: permutations(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'A'], ['B', 'C'], ['C', 'A'], ['C', 'B']]\n return (0, _itertools_ts_1.itertoolsPermutations)(iterable, r);\n}" +const __locutus_standalone_ts_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsPermutations(iterable, r) {\n const pool = toIterableArray(iterable, 'permutations');\n const size = r === undefined ? pool.length : toNonNegativeInteger(r, 'permutations');\n const result = [];\n if (size > pool.length) {\n return [];\n }\n buildPermutations(pool, size, [], new Set(), result);\n return result;\n}\nfunction buildPermutations(pool, size, current, usedIndexes, result) {\n if (current.length === size) {\n result.push([...current]);\n return;\n }\n for (let index = 0; index < pool.length; index += 1) {\n if (usedIndexes.has(index)) {\n continue;\n }\n usedIndexes.add(index);\n current.push(pool[index]);\n buildPermutations(pool, size, current, usedIndexes, result);\n current.pop();\n usedIndexes.delete(index);\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/permutations (target function module)\nfunction permutations(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/permutations/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: permutations(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'A'], ['B', 'C'], ['C', 'A'], ['C', 'B']]\n return itertoolsPermutations(iterable, r);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction itertoolsPermutations(iterable, r) {\n const pool = toIterableArray(iterable, 'permutations');\n const size = r === undefined ? pool.length : toNonNegativeInteger(r, 'permutations');\n const result = [];\n if (size > pool.length) {\n return [];\n }\n buildPermutations(pool, size, [], new Set(), result);\n return result;\n}\nfunction buildPermutations(pool, size, current, usedIndexes, result) {\n if (current.length === size) {\n result.push([...current]);\n return;\n }\n for (let index = 0; index < pool.length; index += 1) {\n if (usedIndexes.has(index)) {\n continue;\n }\n usedIndexes.add(index);\n current.push(pool[index]);\n buildPermutations(pool, size, current, usedIndexes, result);\n current.pop();\n usedIndexes.delete(index);\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\n// python/itertools/permutations (target function module)\nfunction permutations(iterable, r) {\n // discuss at: https://locutus.io/python/itertools/permutations/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: permutations(['A', 'B', 'C'], 2)\n // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'A'], ['B', 'C'], ['C', 'A'], ['C', 'B']]\n return itertoolsPermutations(iterable, r);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/permutations.ts (tested in test/generated/python/itertools/permutations.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [['A', 'B'], ['A', 'C'], ['B', 'A'], ['B', 'C'], ['C', 'A'], ['C', 'B']] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (permutations: typeof __locutus_source_fn) => { + return permutations(['A', 'B', 'C'], 2) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/product.vitest.ts b/test/generated/python/itertools/product.vitest.ts new file mode 100644 index 0000000000..953b03e005 --- /dev/null +++ b/test/generated/python/itertools/product.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/product.ts').product +const __locutus_source_module_url = new URL("../../../../src/python/itertools/product.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "product" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.product = product;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction product(...args) {\n // discuss at: https://locutus.io/python/itertools/product/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: product([1, 2], ['A', 'B'])\n // returns 1: [[1, 'A'], [1, 'B'], [2, 'A'], [2, 'B']]\n return (0, _itertools_ts_1.itertoolsProduct)(args);\n}" +const __locutus_standalone_ts_code = "function toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction parseProductArgs(args) {\n if (args.length === 0) {\n return { iterables: [], repeat: 1 };\n }\n const options = extractRepeatOptions(args[args.length - 1]);\n if (!options) {\n return { iterables: args, repeat: 1 };\n }\n return {\n iterables: args.slice(0, -1),\n repeat: toNonNegativeInteger(options.repeat ?? 1, 'product'),\n };\n}\nfunction itertoolsProduct(args) {\n const { iterables, repeat } = parseProductArgs(args);\n const basePools = iterables.map((iterable) => toIterableArray(iterable, 'product'));\n const pools = repeat === 1\n ? basePools\n : Array.from({ length: repeat }, () => basePools).flatMap((poolSet) => poolSet.map((pool) => [...pool]));\n if (pools.length === 0) {\n return [[]];\n }\n if (pools.some((pool) => pool.length === 0)) {\n return [];\n }\n const result = [];\n buildProduct(pools, 0, [], result);\n return result;\n}\nfunction buildProduct(pools, index, current, result) {\n if (index >= pools.length) {\n result.push([...current]);\n return;\n }\n const pool = pools[index] ?? [];\n for (const value of pool) {\n current.push(value);\n buildProduct(pools, index + 1, current, result);\n current.pop();\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\nfunction extractRepeatOptions(value) {\n if (!isPlainObject(value)) {\n return null;\n }\n const keys = Object.keys(value);\n if (keys.length === 0 || keys.some((key) => key !== 'repeat')) {\n return null;\n }\n return value;\n}\nfunction isPlainObject(value) {\n return typeof value === 'object' && value !== null && Object.getPrototypeOf(value) === Object.prototype;\n}\n// python/itertools/product (target function module)\nfunction product(...args) {\n // discuss at: https://locutus.io/python/itertools/product/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: product([1, 2], ['A', 'B'])\n // returns 1: [[1, 'A'], [1, 'B'], [2, 'A'], [2, 'B']]\n return itertoolsProduct(args);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction parseProductArgs(args) {\n if (args.length === 0) {\n return { iterables: [], repeat: 1 };\n }\n const options = extractRepeatOptions(args[args.length - 1]);\n if (!options) {\n return { iterables: args, repeat: 1 };\n }\n return {\n iterables: args.slice(0, -1),\n repeat: toNonNegativeInteger(options.repeat ?? 1, 'product'),\n };\n}\nfunction itertoolsProduct(args) {\n const { iterables, repeat } = parseProductArgs(args);\n const basePools = iterables.map((iterable) => toIterableArray(iterable, 'product'));\n const pools = repeat === 1\n ? basePools\n : Array.from({ length: repeat }, () => basePools).flatMap((poolSet) => poolSet.map((pool) => [...pool]));\n if (pools.length === 0) {\n return [[]];\n }\n if (pools.some((pool) => pool.length === 0)) {\n return [];\n }\n const result = [];\n buildProduct(pools, 0, [], result);\n return result;\n}\nfunction buildProduct(pools, index, current, result) {\n if (index >= pools.length) {\n result.push([...current]);\n return;\n }\n const pool = pools[index] ?? [];\n for (const value of pool) {\n current.push(value);\n buildProduct(pools, index + 1, current, result);\n current.pop();\n }\n}\nfunction toNonNegativeInteger(value, functionName) {\n if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw new TypeError(`${functionName}() expected a non-negative integer`);\n }\n return value;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\nfunction extractRepeatOptions(value) {\n if (!isPlainObject(value)) {\n return null;\n }\n const keys = Object.keys(value);\n if (keys.length === 0 || keys.some((key) => key !== 'repeat')) {\n return null;\n }\n return value;\n}\nfunction isPlainObject(value) {\n return typeof value === 'object' && value !== null && Object.getPrototypeOf(value) === Object.prototype;\n}\n// python/itertools/product (target function module)\nfunction product(...args) {\n // discuss at: https://locutus.io/python/itertools/product/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: product([1, 2], ['A', 'B'])\n // returns 1: [[1, 'A'], [1, 'B'], [2, 'A'], [2, 'B']]\n return itertoolsProduct(args);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/product.ts (tested in test/generated/python/itertools/product.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [[1, 'A'], [1, 'B'], [2, 'A'], [2, 'B']] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (product: typeof __locutus_source_fn) => { + return product([1, 2], ['A', 'B']) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/generated/python/itertools/zip_longest.vitest.ts b/test/generated/python/itertools/zip_longest.vitest.ts new file mode 100644 index 0000000000..aefa1e6312 --- /dev/null +++ b/test/generated/python/itertools/zip_longest.vitest.ts @@ -0,0 +1,48 @@ +// warning: This file is auto generated by `yarn build:tests` +// Do not edit by hand! + +import { createRequire } from 'node:module' +import { describe, it, expect } from 'vitest' + +process.env.TZ = 'UTC' +const __locutus_source_fn = require('../../../../src/python/itertools/zip_longest.ts').zip_longest +const __locutus_source_module_url = new URL("../../../../src/python/itertools/zip_longest.ts", import.meta.url) +const __locutus_source_require = createRequire(__locutus_source_module_url) +const __locutus_func_name = "zip_longest" +const __locutus_module_js_code = "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.zip_longest = zip_longest;\nconst _itertools_ts_1 = require(\"../_helpers/_itertools.ts\");\nfunction zip_longest(...args) {\n // discuss at: https://locutus.io/python/itertools/zip_longest/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: zip_longest([1, 2, 3], ['A', 'B'])\n // returns 1: [[1, 'A'], [2, 'B'], [3, null]]\n return (0, _itertools_ts_1.itertoolsZipLongest)(args);\n}" +const __locutus_standalone_ts_code = "function toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction parseZipLongestArgs(args) {\n if (args.length === 0) {\n return { iterables: [], fillvalue: null };\n }\n const options = extractIterableOptions(args[args.length - 1]);\n if (!options) {\n return { iterables: args, fillvalue: null };\n }\n return {\n iterables: args.slice(0, -1),\n fillvalue: options.fillvalue ?? null,\n };\n}\nfunction itertoolsZipLongest(args) {\n const { iterables, fillvalue } = parseZipLongestArgs(args);\n const pools = iterables.map((iterable) => toIterableArray(iterable, 'zip_longest'));\n const width = pools.reduce((max, pool) => Math.max(max, pool.length), 0);\n const result = [];\n for (let row = 0; row < width; row += 1) {\n result.push(pools.map((pool) => (row < pool.length ? pool[row] : fillvalue)));\n }\n return result;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\nfunction extractIterableOptions(value) {\n if (!isPlainObject(value)) {\n return null;\n }\n const keys = Object.keys(value);\n if (keys.length === 0 || keys.some((key) => key !== 'fillvalue')) {\n return null;\n }\n return value;\n}\nfunction isPlainObject(value) {\n return typeof value === 'object' && value !== null && Object.getPrototypeOf(value) === Object.prototype;\n}\n// python/itertools/zip_longest (target function module)\nfunction zip_longest(...args) {\n // discuss at: https://locutus.io/python/itertools/zip_longest/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: zip_longest([1, 2, 3], ['A', 'B'])\n // returns 1: [[1, 'A'], [2, 'B'], [3, null]]\n return itertoolsZipLongest(args);\n}" +const __locutus_standalone_js_code = "// python/_helpers/_itertools (Locutus helper dependency)\nfunction toIterableArray(iterable, functionName) {\n if (Array.isArray(iterable)) {\n return [...iterable];\n }\n if (typeof iterable === 'string') {\n return [...iterable];\n }\n if (isIterable(iterable)) {\n return Array.from(iterable);\n }\n throw new TypeError(`${functionName}() expected an iterable`);\n}\nfunction parseZipLongestArgs(args) {\n if (args.length === 0) {\n return { iterables: [], fillvalue: null };\n }\n const options = extractIterableOptions(args[args.length - 1]);\n if (!options) {\n return { iterables: args, fillvalue: null };\n }\n return {\n iterables: args.slice(0, -1),\n fillvalue: options.fillvalue ?? null,\n };\n}\nfunction itertoolsZipLongest(args) {\n const { iterables, fillvalue } = parseZipLongestArgs(args);\n const pools = iterables.map((iterable) => toIterableArray(iterable, 'zip_longest'));\n const width = pools.reduce((max, pool) => Math.max(max, pool.length), 0);\n const result = [];\n for (let row = 0; row < width; row += 1) {\n result.push(pools.map((pool) => (row < pool.length ? pool[row] : fillvalue)));\n }\n return result;\n}\nfunction isIterable(value) {\n return ((typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n Symbol.iterator in value &&\n typeof value[Symbol.iterator] === 'function');\n}\nfunction extractIterableOptions(value) {\n if (!isPlainObject(value)) {\n return null;\n }\n const keys = Object.keys(value);\n if (keys.length === 0 || keys.some((key) => key !== 'fillvalue')) {\n return null;\n }\n return value;\n}\nfunction isPlainObject(value) {\n return typeof value === 'object' && value !== null && Object.getPrototypeOf(value) === Object.prototype;\n}\n// python/itertools/zip_longest (target function module)\nfunction zip_longest(...args) {\n // discuss at: https://locutus.io/python/itertools/zip_longest/\n // parity verified: Python 3.12\n // original by: Kevin van Zonneveld (https://kvz.io)\n // example 1: zip_longest([1, 2, 3], ['A', 'B'])\n // returns 1: [[1, 'A'], [2, 'B'], [3, null]]\n return itertoolsZipLongest(args);\n}" + +const __locutus_eval_function = (compiledCode: string): ((...args: unknown[]) => unknown) => { + const evaluator = new Function('require', compiledCode + '\nreturn ' + __locutus_func_name + ';') + return evaluator(__locutus_source_require) as (...args: unknown[]) => unknown +} +const __locutus_eval_module_export = (compiledCode: string, exportName: string): ((...args: unknown[]) => unknown) => { + const module = { exports: {} as { [key: string]: unknown } } + const exports = module.exports + const evaluator = new Function('exports', 'module', 'require', compiledCode) + evaluator(exports, module, __locutus_source_require) + return module.exports[exportName] as (...args: unknown[]) => unknown +} +const __locutus_module_js_fn = __locutus_eval_module_export(__locutus_module_js_code, __locutus_func_name) +const __locutus_standalone_ts_fn = __locutus_eval_function(__locutus_standalone_ts_code) +const __locutus_standalone_js_fn = __locutus_eval_function(__locutus_standalone_js_code) + +describe('src/python/itertools/zip_longest.ts (tested in test/generated/python/itertools/zip_longest.vitest.ts)', function () { + it('should pass example 1', function () { + const expected = [[1, 'A'], [2, 'B'], [3, null]] + const __locutus_variants: Array<{ name: string; fn: (...args: unknown[]) => unknown }> = [ + { name: "source", fn: __locutus_source_fn }, + { name: "module-js", fn: __locutus_module_js_fn }, + { name: "standalone-ts", fn: __locutus_standalone_ts_fn }, + { name: "standalone-js", fn: __locutus_standalone_js_fn }, + ] + const __locutus_run_example = (zip_longest: typeof __locutus_source_fn) => { + return zip_longest([1, 2, 3], ['A', 'B']) + } + for (const __locutus_variant of __locutus_variants) { + const result = __locutus_run_example(__locutus_variant.fn as typeof __locutus_source_fn) + expect(result).toEqual(expected) + } + }) +}) diff --git a/test/parity/lib/languages/python.ts b/test/parity/lib/languages/python.ts index 93e8214663..c86b003faf 100644 --- a/test/parity/lib/languages/python.ts +++ b/test/parity/lib/languages/python.ts @@ -21,6 +21,20 @@ const STRING_CONSTANTS = new Set([ 'whitespace', ]) +const PYTHON_LISTIFY_OUTPUT_FUNCTIONS = new Set([ + 'accumulate', + 'batched', + 'chain', + 'combinations', + 'combinations_with_replacement', + 'compress', + 'islice', + 'pairwise', + 'permutations', + 'product', + 'zip_longest', +]) + // Functions to skip (implementation differences, etc.) export const PYTHON_SKIP_LIST = new Set([ // None currently - all Python functions should be testable @@ -528,15 +542,18 @@ function jsToPython(jsCode: string[], funcName: string, category?: string): stri const originalLastLine = jsCode[jsCode.length - 1] const assignedVar = extractAssignedVar(originalLastLine) + const shouldListifyOutput = module === 'itertools' && PYTHON_LISTIFY_OUTPUT_FUNCTIONS.has(funcName) let result: string if (assignedVar) { - result = `${imports}${lines.join('\n')}\nprint(json.dumps(${assignedVar}))` + const outputExpr = shouldListifyOutput ? `list(${assignedVar})` : assignedVar + result = `${imports}${lines.join('\n')}\nprint(json.dumps(${outputExpr}))` } else { const setup = lines.slice(0, -1) const lastExpr = lines[lines.length - 1] const prefix = setup.length ? `${setup.join('\n')}\n` : '' - result = `${imports}${prefix}print(json.dumps(${lastExpr}))` + const outputExpr = shouldListifyOutput ? `list(${lastExpr})` : lastExpr + result = `${imports}${prefix}print(json.dumps(${outputExpr}))` } return result diff --git a/test/util/python-itertools-harvest-1.vitest.ts b/test/util/python-itertools-harvest-1.vitest.ts new file mode 100644 index 0000000000..bfc8b4b1ad --- /dev/null +++ b/test/util/python-itertools-harvest-1.vitest.ts @@ -0,0 +1,45 @@ +import { describe, expect, it } from 'vitest' + +import { accumulate } from '../../src/python/itertools/accumulate.ts' +import { batched } from '../../src/python/itertools/batched.ts' +import { chain } from '../../src/python/itertools/chain.ts' +import { compress } from '../../src/python/itertools/compress.ts' +import { islice } from '../../src/python/itertools/islice.ts' +import { product } from '../../src/python/itertools/product.ts' +import { zip_longest } from '../../src/python/itertools/zip_longest.ts' + +describe('python itertools harvest 1', () => { + it('supports default accumulate semantics for scalars and strings', () => { + expect(accumulate([1, 2, 3, 4])).toEqual([1, 3, 6, 10]) + expect(accumulate(['a', 'b', 'c'])).toEqual(['a', 'ab', 'abc']) + }) + + it('supports shared plain-value iterator helpers', () => { + expect(chain([1, 2], 'ab', new Set([3, 4]))).toEqual([1, 2, 'a', 'b', 3, 4]) + expect(compress(['A', 'B', 'C', 'D'], [1, 0, true, null])).toEqual(['A', 'C']) + expect(islice([0, 1, 2, 3, 4, 5], 1, 6, 2)).toEqual([1, 3, 5]) + }) + + it('supports zip_longest fill values and product repeat', () => { + expect(zip_longest([1, 2, 3], ['A', 'B'])).toEqual([ + [1, 'A'], + [2, 'B'], + [3, null], + ]) + expect(zip_longest([1], [2, 3], { fillvalue: 'x' })).toEqual([ + [1, 2], + ['x', 3], + ]) + expect(product([1, 2], { repeat: 2 })).toEqual([ + [1, 1], + [1, 2], + [2, 1], + [2, 2], + ]) + }) + + it('rejects invalid batch and slice sizes', () => { + expect(() => batched([1, 2, 3], 0)).toThrow('n must be at least one') + expect(() => islice([1, 2, 3], 0, 3, 0)).toThrow('step for islice() must be a positive integer or None') + }) +}) diff --git a/test/util/type-contracts.generated.d.ts b/test/util/type-contracts.generated.d.ts index fa4da2e519..471f507669 100644 --- a/test/util/type-contracts.generated.d.ts +++ b/test/util/type-contracts.generated.d.ts @@ -572,6 +572,7 @@ import type * as m_1s4bicm from '../../src/powershell/string/trim.ts' import type * as m_1phkqc9 from '../../src/powershell/string/trimend.ts' import type * as m_1lhdar6 from '../../src/powershell/string/trimstart.ts' import type * as m_10juf3l from '../../src/python/_helpers/_calendar.ts' +import type * as m_1n5dlhk from '../../src/python/_helpers/_itertools.ts' import type * as m_w3prrf from '../../src/python/_helpers/_operator.ts' import type * as m_1xbjj3g from '../../src/python/_helpers/_statistics.ts' import type * as m_1x9xojq from '../../src/python/calendar/calendar.ts' @@ -587,6 +588,17 @@ import type * as m_68n8pa from '../../src/python/calendar/weekday.ts' import type * as m_10jp0o3 from '../../src/python/calendar/weekheader.ts' import type * as m_14z118h from '../../src/python/difflib/get_close_matches.ts' import type * as m_n63o7l from '../../src/python/difflib/ndiff.ts' +import type * as m_bw84gn from '../../src/python/itertools/accumulate.ts' +import type * as m_117246g from '../../src/python/itertools/batched.ts' +import type * as m_1ahxsg0 from '../../src/python/itertools/chain.ts' +import type * as m_7qgd2t from '../../src/python/itertools/combinations.ts' +import type * as m_3o090t from '../../src/python/itertools/combinations_with_replacement.ts' +import type * as m_x2ghav from '../../src/python/itertools/compress.ts' +import type * as m_zpubps from '../../src/python/itertools/islice.ts' +import type * as m_fr0bgb from '../../src/python/itertools/pairwise.ts' +import type * as m_12kbq24 from '../../src/python/itertools/permutations.ts' +import type * as m_1yjce36 from '../../src/python/itertools/product.ts' +import type * as m_1w5rwz9 from '../../src/python/itertools/zip_longest.ts' import type * as m_1u2h1u0 from '../../src/python/math/acos.ts' import type * as m_1naimyy from '../../src/python/math/acosh.ts' import type * as m_2iozo7 from '../../src/python/math/asin.ts' @@ -4173,1301 +4185,1371 @@ type _TypeContract_0620_Param4_RejectsBoolean = ExpectFalse[5]>> type _TypeContract_0620_Param5_RejectsString = ExpectFalse[5]>> type _TypeContract_0620_Param5_RejectsBoolean = ExpectFalse[5]>> -type _TypeContract_0621_ReturnNotAny = ExpectFalse>> -type _TypeContract_0621_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0622_ReturnNotAny = ExpectFalse>> -type _TypeContract_0622_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0622_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0622_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0622_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0623_ReturnNotAny = ExpectFalse>> -type _TypeContract_0623_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0623_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0623_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0623_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0624_ReturnNotAny = ExpectFalse>> -type _TypeContract_0624_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0624_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0624_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0624_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0625_ReturnNotAny = ExpectFalse>> -type _TypeContract_0625_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0625_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0625_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0625_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0626_ReturnNotAny = ExpectFalse>> -type _TypeContract_0626_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0626_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0626_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0626_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0627_ReturnNotAny = ExpectFalse>> -type _TypeContract_0627_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0627_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0627_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0627_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0628_ReturnNotAny = ExpectFalse>> -type _TypeContract_0628_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0629_ReturnNotAny = ExpectFalse>> -type _TypeContract_0629_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0630_ReturnNotAny = ExpectFalse>> -type _TypeContract_0630_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0630_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0630_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0630_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0630_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0631_ReturnNotAny = ExpectFalse>> -type _TypeContract_0631_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0631_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0631_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0631_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0631_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0632_ReturnNotAny = ExpectFalse>> -type _TypeContract_0632_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0632_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0632_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0632_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0632_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0633_ReturnNotAny = ExpectFalse>> -type _TypeContract_0633_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0633_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0633_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0633_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0633_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0634_ReturnNotAny = ExpectFalse>> -type _TypeContract_0634_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0634_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0634_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0634_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0634_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0635_ReturnNotAny = ExpectFalse>> -type _TypeContract_0635_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0635_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0635_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0635_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0635_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0636_ReturnNotAny = ExpectFalse>> -type _TypeContract_0636_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0636_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0636_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0636_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0636_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0637_ReturnNotAny = ExpectFalse>> -type _TypeContract_0637_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0637_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0637_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0637_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0637_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0638_ReturnNotAny = ExpectFalse>> -type _TypeContract_0638_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0638_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0638_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0638_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0638_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0639_ReturnNotAny = ExpectFalse>> -type _TypeContract_0639_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0639_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0639_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0639_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0639_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0640_ReturnNotAny = ExpectFalse>> -type _TypeContract_0640_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0640_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0640_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0640_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0640_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0641_ReturnNotAny = ExpectFalse>> -type _TypeContract_0641_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0641_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0641_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0641_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0641_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0642_ReturnNotAny = ExpectFalse>> -type _TypeContract_0642_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0642_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0642_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0642_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0643_ReturnNotAny = ExpectFalse>> -type _TypeContract_0643_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0643_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0643_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0643_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0644_ReturnNotAny = ExpectFalse>> -type _TypeContract_0644_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0644_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0645_ReturnNotAny = ExpectFalse>> -type _TypeContract_0645_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0645_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0646_ReturnNotAny = ExpectFalse>> -type _TypeContract_0646_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0646_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0646_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0646_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0646_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0647_ReturnNotAny = ExpectFalse>> -type _TypeContract_0647_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0647_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0648_ReturnNotAny = ExpectFalse>> -type _TypeContract_0648_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0648_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0649_ReturnNotAny = ExpectFalse>> -type _TypeContract_0649_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0649_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0650_ReturnNotAny = ExpectFalse>> -type _TypeContract_0650_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0650_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0651_ReturnNotAny = ExpectFalse>> -type _TypeContract_0651_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0651_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0652_ReturnNotAny = ExpectFalse>> -type _TypeContract_0652_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0652_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0652_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0652_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0653_ReturnNotAny = ExpectFalse>> -type _TypeContract_0653_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0653_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0653_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0653_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0654_ReturnNotAny = ExpectFalse>> -type _TypeContract_0654_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0654_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0654_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0654_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0655_ReturnNotAny = ExpectFalse>> -type _TypeContract_0655_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0655_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0655_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0655_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0656_ReturnNotAny = ExpectFalse>> -type _TypeContract_0656_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0656_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0656_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0657_ReturnNotAny = ExpectFalse>> -type _TypeContract_0657_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0657_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0657_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0657_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0657_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0657_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0657_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0657_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0657_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0657_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0657_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0658_ReturnNotAny = ExpectFalse>> -type _TypeContract_0658_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0659_ReturnNotAny = ExpectFalse>> -type _TypeContract_0659_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0659_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0660_ReturnNotAny = ExpectFalse>> -type _TypeContract_0660_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0661_ReturnNotAny = ExpectFalse>> -type _TypeContract_0661_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0661_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0661_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0661_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0662_ReturnNotAny = ExpectFalse>> -type _TypeContract_0662_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0662_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0662_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0662_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0662_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0662_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0662_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0662_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0662_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0662_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0662_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0662_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0662_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0662_Param4_NotAny = ExpectFalse[4]>> -type _TypeContract_0662_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> -type _TypeContract_0662_Param4_RejectsString = ExpectFalse[4]>> -type _TypeContract_0662_Param4_RejectsBoolean = ExpectFalse[4]>> -type _TypeContract_0663_ReturnNotAny = ExpectFalse>> -type _TypeContract_0663_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0663_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0663_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0663_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0663_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0663_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0663_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0663_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0663_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0664_ReturnNotAny = ExpectFalse>> -type _TypeContract_0664_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0665_ReturnNotAny = ExpectFalse>> -type _TypeContract_0665_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0665_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0666_ReturnNotAny = ExpectFalse>> -type _TypeContract_0666_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0666_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0666_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0666_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0666_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0666_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0666_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0666_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0666_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0666_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0667_ReturnNotAny = ExpectFalse>> -type _TypeContract_0667_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0667_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0668_ReturnNotAny = ExpectFalse>> -type _TypeContract_0668_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0668_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0669_ReturnNotAny = ExpectFalse>> -type _TypeContract_0669_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0670_ReturnNotAny = ExpectFalse>> -type _TypeContract_0670_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0670_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0671_ReturnNotAny = ExpectFalse>> -type _TypeContract_0671_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0671_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0671_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0672_ReturnNotAny = ExpectFalse>> -type _TypeContract_0672_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0673_ReturnNotAny = ExpectFalse>> -type _TypeContract_0673_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0673_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0673_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0673_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0673_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0673_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0673_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0673_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0673_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0673_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0673_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0673_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0674_ReturnNotAny = ExpectFalse>> -type _TypeContract_0674_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0674_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0674_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0674_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0674_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0674_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0675_ReturnNotAny = ExpectFalse>> -type _TypeContract_0675_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0675_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0675_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0676_ReturnNotAny = ExpectFalse>> -type _TypeContract_0676_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0676_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0676_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0677_ReturnNotAny = ExpectFalse>> -type _TypeContract_0677_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0677_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0677_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0678_ReturnNotAny = ExpectFalse>> -type _TypeContract_0678_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0678_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0678_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0679_ReturnNotAny = ExpectFalse>> -type _TypeContract_0679_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0679_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0679_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0680_ReturnNotAny = ExpectFalse>> -type _TypeContract_0680_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0680_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0680_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0680_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0680_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0680_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0681_ReturnNotAny = ExpectFalse>> -type _TypeContract_0681_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0681_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0681_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0682_ReturnNotAny = ExpectFalse>> -type _TypeContract_0682_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0682_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0682_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0683_ReturnNotAny = ExpectFalse>> -type _TypeContract_0683_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0683_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0683_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0683_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0684_ReturnNotAny = ExpectFalse>> -type _TypeContract_0684_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0684_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0684_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0684_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0684_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0684_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0685_ReturnNotAny = ExpectFalse>> -type _TypeContract_0685_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0685_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0685_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0686_ReturnNotAny = ExpectFalse>> -type _TypeContract_0686_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0686_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0686_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0687_ReturnNotAny = ExpectFalse>> -type _TypeContract_0687_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0687_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0687_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0688_ReturnNotAny = ExpectFalse>> -type _TypeContract_0688_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0688_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0689_ReturnNotAny = ExpectFalse>> -type _TypeContract_0689_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0689_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0689_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0690_ReturnNotAny = ExpectFalse>> -type _TypeContract_0690_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0690_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0690_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0691_ReturnNotAny = ExpectFalse>> -type _TypeContract_0691_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0691_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0691_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0692_ReturnNotAny = ExpectFalse>> -type _TypeContract_0692_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0692_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0693_ReturnNotAny = ExpectFalse>> -type _TypeContract_0693_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0693_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0693_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0694_ReturnNotAny = ExpectFalse>> -type _TypeContract_0694_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0695_ReturnNotAny = ExpectFalse>> -type _TypeContract_0695_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0695_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0695_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0695_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0696_ReturnNotAny = ExpectFalse>> -type _TypeContract_0696_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0697_ReturnNotAny = ExpectFalse>> -type _TypeContract_0697_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0697_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0697_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0697_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0697_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0697_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0697_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0697_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0697_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0697_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0698_ReturnNotAny = ExpectFalse>> -type _TypeContract_0698_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0698_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0698_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0699_ReturnNotAny = ExpectFalse>> -type _TypeContract_0699_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0699_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0699_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0700_ReturnNotAny = ExpectFalse>> -type _TypeContract_0700_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0700_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0700_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0701_ReturnNotAny = ExpectFalse>> -type _TypeContract_0701_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0701_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0702_ReturnNotAny = ExpectFalse>> -type _TypeContract_0702_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0703_ReturnNotAny = ExpectFalse>> -type _TypeContract_0703_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0703_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0703_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0703_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0703_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0703_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0704_ReturnNotAny = ExpectFalse>> -type _TypeContract_0704_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0704_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0704_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0705_ReturnNotAny = ExpectFalse>> -type _TypeContract_0705_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0705_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0705_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0706_ReturnNotAny = ExpectFalse>> -type _TypeContract_0706_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0706_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0706_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0706_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0706_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0706_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0707_ReturnNotAny = ExpectFalse>> -type _TypeContract_0707_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0707_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0707_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0707_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0708_ReturnNotAny = ExpectFalse>> -type _TypeContract_0708_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0708_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0708_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0709_ReturnNotAny = ExpectFalse>> -type _TypeContract_0709_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0709_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0709_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0710_ReturnNotAny = ExpectFalse>> -type _TypeContract_0710_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0710_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0710_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0711_ReturnNotAny = ExpectFalse>> -type _TypeContract_0711_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0711_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0711_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0712_ReturnNotAny = ExpectFalse>> -type _TypeContract_0712_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0712_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0712_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0713_ReturnNotAny = ExpectFalse>> -type _TypeContract_0713_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0713_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0713_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0714_ReturnNotAny = ExpectFalse>> -type _TypeContract_0714_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0714_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0714_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0715_ReturnNotAny = ExpectFalse>> -type _TypeContract_0715_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0716_ReturnNotAny = ExpectFalse>> -type _TypeContract_0716_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0716_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0717_ReturnNotAny = ExpectFalse>> -type _TypeContract_0717_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0717_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0718_ReturnNotAny = ExpectFalse>> -type _TypeContract_0718_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0718_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0719_ReturnNotAny = ExpectFalse>> -type _TypeContract_0719_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0719_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0720_ReturnNotAny = ExpectFalse>> -type _TypeContract_0720_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0720_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0721_ReturnNotAny = ExpectFalse>> -type _TypeContract_0721_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0721_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0722_ReturnNotAny = ExpectFalse>> -type _TypeContract_0722_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0722_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0723_ReturnNotAny = ExpectFalse>> -type _TypeContract_0723_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0723_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0724_ReturnNotAny = ExpectFalse>> -type _TypeContract_0724_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0724_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0725_ReturnNotAny = ExpectFalse>> -type _TypeContract_0725_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0725_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0726_ReturnNotAny = ExpectFalse>> -type _TypeContract_0726_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0726_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0727_ReturnNotAny = ExpectFalse>> -type _TypeContract_0727_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0728_ReturnNotAny = ExpectFalse>> -type _TypeContract_0728_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0729_ReturnNotAny = ExpectFalse>> -type _TypeContract_0729_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0729_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0730_ReturnNotAny = ExpectFalse>> -type _TypeContract_0730_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0730_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0731_ReturnNotAny = ExpectFalse>> -type _TypeContract_0731_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0731_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0732_ReturnNotAny = ExpectFalse>> -type _TypeContract_0732_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0732_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0733_ReturnNotAny = ExpectFalse>> -type _TypeContract_0733_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0733_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0734_ReturnNotAny = ExpectFalse>> -type _TypeContract_0734_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0734_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0735_ReturnNotAny = ExpectFalse>> -type _TypeContract_0735_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0735_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0736_ReturnNotAny = ExpectFalse>> -type _TypeContract_0736_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0736_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0737_ReturnNotAny = ExpectFalse>> -type _TypeContract_0737_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0738_ReturnNotAny = ExpectFalse>> -type _TypeContract_0738_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0739_ReturnNotAny = ExpectFalse>> -type _TypeContract_0739_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0739_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0740_ReturnNotAny = ExpectFalse>> -type _TypeContract_0740_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0741_ReturnNotAny = ExpectFalse>> -type _TypeContract_0741_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0741_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0742_ReturnNotAny = ExpectFalse>> -type _TypeContract_0742_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0742_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0743_ReturnNotAny = ExpectFalse>> -type _TypeContract_0743_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0743_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0744_ReturnNotAny = ExpectFalse>> -type _TypeContract_0744_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0744_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0745_ReturnNotAny = ExpectFalse>> -type _TypeContract_0745_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0746_ReturnNotAny = ExpectFalse>> -type _TypeContract_0746_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0746_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0747_ReturnNotAny = ExpectFalse>> -type _TypeContract_0747_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0747_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0747_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0747_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0747_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0747_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0747_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0747_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0747_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0748_ReturnNotAny = ExpectFalse>> -type _TypeContract_0748_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0748_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0748_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0748_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0748_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0748_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0748_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0748_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0748_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0749_ReturnNotAny = ExpectFalse>> -type _TypeContract_0749_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0749_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0749_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0749_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0749_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0749_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0749_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0749_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0749_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0749_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0749_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0749_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0749_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0749_Param4_NotAny = ExpectFalse[4]>> -type _TypeContract_0749_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> -type _TypeContract_0749_Param4_RejectsBoolean = ExpectFalse[4]>> -type _TypeContract_0750_ReturnNotAny = ExpectFalse>> -type _TypeContract_0750_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0750_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0750_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0750_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0750_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0750_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0750_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0750_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0750_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0750_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0750_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0750_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0750_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0750_Param4_NotAny = ExpectFalse[4]>> -type _TypeContract_0750_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> -type _TypeContract_0750_Param4_RejectsBoolean = ExpectFalse[4]>> -type _TypeContract_0751_ReturnNotAny = ExpectFalse>> -type _TypeContract_0751_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0751_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0751_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0751_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0751_Param2_AcceptsKnownLiteral = ExpectTrue[2]>> -type _TypeContract_0751_Param2_RejectsInvalidLiteral = ExpectFalse[2]>> -type _TypeContract_0752_ReturnNotAny = ExpectFalse>> -type _TypeContract_0752_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0752_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0753_ReturnNotAny = ExpectFalse>> -type _TypeContract_0753_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0753_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0753_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0754_ReturnNotAny = ExpectFalse>> -type _TypeContract_0754_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0755_ReturnNotAny = ExpectFalse>> -type _TypeContract_0755_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0755_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0755_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0756_ReturnNotAny = ExpectFalse>> -type _TypeContract_0756_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0756_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0756_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0756_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0757_ReturnNotAny = ExpectFalse>> -type _TypeContract_0757_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0758_ReturnNotAny = ExpectFalse>> -type _TypeContract_0758_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0759_ReturnNotAny = ExpectFalse>> -type _TypeContract_0759_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0759_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0759_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0759_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0759_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0760_ReturnNotAny = ExpectFalse>> -type _TypeContract_0760_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0761_ReturnNotAny = ExpectFalse>> -type _TypeContract_0761_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0762_ReturnNotAny = ExpectFalse>> -type _TypeContract_0762_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0763_ReturnNotAny = ExpectFalse>> -type _TypeContract_0763_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0764_ReturnNotAny = ExpectFalse>> -type _TypeContract_0764_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0764_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0764_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0764_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0764_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0765_ReturnNotAny = ExpectFalse>> -type _TypeContract_0765_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0765_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0765_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0765_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0765_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0766_ReturnNotAny = ExpectFalse>> -type _TypeContract_0766_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0766_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0766_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0766_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0766_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0766_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0766_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0766_Param2_AcceptsKnownLiteral = ExpectTrue[2]>> -type _TypeContract_0766_Param2_RejectsInvalidLiteral = ExpectFalse[2]>> -type _TypeContract_0767_ReturnNotAny = ExpectFalse>> -type _TypeContract_0767_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0767_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0767_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0767_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0767_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0768_ReturnNotAny = ExpectFalse>> -type _TypeContract_0768_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0768_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0768_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0768_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0768_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0769_ReturnNotAny = ExpectFalse>> -type _TypeContract_0770_ReturnNotAny = ExpectFalse>> -type _TypeContract_0771_ReturnNotAny = ExpectFalse>> -type _TypeContract_0772_ReturnNotAny = ExpectFalse>> -type _TypeContract_0772_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0772_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0772_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0773_ReturnNotAny = ExpectFalse>> -type _TypeContract_0774_ReturnNotAny = ExpectFalse>> -type _TypeContract_0775_ReturnNotAny = ExpectFalse>> -type _TypeContract_0776_ReturnNotAny = ExpectFalse>> -type _TypeContract_0777_ReturnNotAny = ExpectFalse>> -type _TypeContract_0778_ReturnNotAny = ExpectFalse>> -type _TypeContract_0779_ReturnNotAny = ExpectFalse>> -type _TypeContract_0779_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0779_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0779_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0780_ReturnNotAny = ExpectFalse>> -type _TypeContract_0780_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0780_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0780_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0781_ReturnNotAny = ExpectFalse>> -type _TypeContract_0781_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0781_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0781_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0782_ReturnNotAny = ExpectFalse>> -type _TypeContract_0782_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0782_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0782_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0782_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0782_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0782_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0782_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0783_ReturnNotAny = ExpectFalse>> -type _TypeContract_0783_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0784_ReturnNotAny = ExpectFalse>> -type _TypeContract_0784_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0785_ReturnNotAny = ExpectFalse>> -type _TypeContract_0785_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0785_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0785_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0786_ReturnNotAny = ExpectFalse>> -type _TypeContract_0786_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0786_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0786_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0786_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0786_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0786_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0786_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0787_ReturnNotAny = ExpectFalse>> -type _TypeContract_0787_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0787_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0787_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0787_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0787_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0787_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0787_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0787_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0787_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0787_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0787_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0787_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0787_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0787_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0787_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0788_ReturnNotAny = ExpectFalse>> -type _TypeContract_0788_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0788_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0788_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0789_ReturnNotAny = ExpectFalse>> -type _TypeContract_0789_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0789_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0789_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0790_ReturnNotAny = ExpectFalse>> -type _TypeContract_0790_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0790_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0790_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0791_ReturnNotAny = ExpectFalse>> -type _TypeContract_0791_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0791_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0791_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0792_ReturnNotAny = ExpectFalse>> -type _TypeContract_0792_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0792_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0793_ReturnNotAny = ExpectFalse>> -type _TypeContract_0793_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0793_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0794_ReturnNotAny = ExpectFalse>> -type _TypeContract_0794_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0795_ReturnNotAny = ExpectFalse>> -type _TypeContract_0795_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0795_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0796_ReturnNotAny = ExpectFalse>> -type _TypeContract_0796_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0796_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0796_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0796_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0796_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0797_ReturnNotAny = ExpectFalse>> -type _TypeContract_0797_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0797_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0797_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0797_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0797_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0798_ReturnNotAny = ExpectFalse>> -type _TypeContract_0798_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0799_ReturnNotAny = ExpectFalse>> -type _TypeContract_0799_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0799_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0799_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0799_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0799_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0800_ReturnNotAny = ExpectFalse>> -type _TypeContract_0800_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0800_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0800_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0800_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0800_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0801_ReturnNotAny = ExpectFalse>> -type _TypeContract_0801_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0801_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0801_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0801_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0801_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0802_ReturnNotAny = ExpectFalse>> -type _TypeContract_0802_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0802_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0803_ReturnNotAny = ExpectFalse>> -type _TypeContract_0803_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0804_ReturnNotAny = ExpectFalse>> -type _TypeContract_0804_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0805_ReturnNotAny = ExpectFalse>> -type _TypeContract_0805_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0805_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0806_ReturnNotAny = ExpectFalse>> -type _TypeContract_0806_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0806_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0806_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0807_ReturnNotAny = ExpectFalse>> -type _TypeContract_0807_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0807_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0807_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0808_ReturnNotAny = ExpectFalse>> -type _TypeContract_0808_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0808_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0808_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0809_ReturnNotAny = ExpectFalse>> -type _TypeContract_0809_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0809_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0809_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0810_ReturnNotAny = ExpectFalse>> -type _TypeContract_0810_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0810_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0810_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0811_ReturnNotAny = ExpectFalse>> -type _TypeContract_0811_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0811_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0811_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0812_ReturnNotAny = ExpectFalse>> -type _TypeContract_0812_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0812_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0812_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0813_ReturnNotAny = ExpectFalse>> -type _TypeContract_0813_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0813_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0813_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0814_ReturnNotAny = ExpectFalse>> -type _TypeContract_0814_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0814_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0814_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0815_ReturnNotAny = ExpectFalse>> -type _TypeContract_0815_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0815_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0815_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0816_ReturnNotAny = ExpectFalse>> -type _TypeContract_0816_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0816_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0816_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0817_ReturnNotAny = ExpectFalse>> -type _TypeContract_0817_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0817_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0817_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0818_ReturnNotAny = ExpectFalse>> -type _TypeContract_0818_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0818_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0818_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0819_ReturnNotAny = ExpectFalse>> -type _TypeContract_0819_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0819_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0819_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0820_ReturnNotAny = ExpectFalse>> -type _TypeContract_0820_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0820_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0820_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0821_ReturnNotAny = ExpectFalse>> -type _TypeContract_0821_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0821_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0821_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0822_ReturnNotAny = ExpectFalse>> -type _TypeContract_0822_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0822_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0822_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0822_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0822_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0822_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0822_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0823_ReturnNotAny = ExpectFalse>> -type _TypeContract_0823_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0823_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0823_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0824_ReturnNotAny = ExpectFalse>> -type _TypeContract_0824_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0824_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0824_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0824_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0824_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0824_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0825_ReturnNotAny = ExpectFalse>> -type _TypeContract_0825_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0825_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0825_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0825_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0825_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0825_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0826_ReturnNotAny = ExpectFalse>> -type _TypeContract_0826_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0826_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0826_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0827_ReturnNotAny = ExpectFalse>> -type _TypeContract_0827_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0827_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0827_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0827_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0827_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0827_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0828_ReturnNotAny = ExpectFalse>> -type _TypeContract_0828_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0828_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0828_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0828_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0828_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0828_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0828_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0828_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0828_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0829_ReturnNotAny = ExpectFalse>> -type _TypeContract_0829_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0829_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0829_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0829_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0829_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0829_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0830_ReturnNotAny = ExpectFalse>> -type _TypeContract_0830_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0830_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0830_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0831_ReturnNotAny = ExpectFalse>> -type _TypeContract_0831_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0831_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0831_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0832_ReturnNotAny = ExpectFalse>> -type _TypeContract_0832_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0832_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0832_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0832_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0832_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0832_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0833_ReturnNotAny = ExpectFalse>> -type _TypeContract_0833_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0833_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0833_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0834_ReturnNotAny = ExpectFalse>> -type _TypeContract_0834_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0834_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0834_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0834_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0834_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0834_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0834_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0834_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0834_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0835_ReturnNotAny = ExpectFalse>> -type _TypeContract_0835_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0835_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0835_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0836_ReturnNotAny = ExpectFalse>> -type _TypeContract_0836_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0836_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0836_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0836_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0836_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0836_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0837_ReturnNotAny = ExpectFalse>> -type _TypeContract_0837_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0837_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0837_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0837_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0837_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0837_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0838_ReturnNotAny = ExpectFalse>> -type _TypeContract_0838_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0838_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0838_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0838_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0838_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0838_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0839_ReturnNotAny = ExpectFalse>> -type _TypeContract_0839_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0839_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0839_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0840_ReturnNotAny = ExpectFalse>> -type _TypeContract_0840_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0840_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0840_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0841_ReturnNotAny = ExpectFalse>> -type _TypeContract_0841_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0841_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0841_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0841_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0841_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0841_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0842_ReturnNotAny = ExpectFalse>> -type _TypeContract_0842_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0842_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0842_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0842_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0842_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0842_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0842_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0842_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0842_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0843_ReturnNotAny = ExpectFalse>> -type _TypeContract_0843_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0843_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0843_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0843_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0843_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0843_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0844_ReturnNotAny = ExpectFalse>> -type _TypeContract_0844_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0844_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0844_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0844_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0844_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0844_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0845_ReturnNotAny = ExpectFalse>> -type _TypeContract_0845_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0845_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0845_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0845_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0845_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0845_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0846_ReturnNotAny = ExpectFalse>> -type _TypeContract_0846_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0846_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0846_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0846_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0846_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0846_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0846_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0846_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0846_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0847_ReturnNotAny = ExpectFalse>> -type _TypeContract_0847_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0847_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0847_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0847_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0847_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0847_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0848_ReturnNotAny = ExpectFalse>> -type _TypeContract_0848_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0848_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0848_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0848_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0848_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0848_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0849_ReturnNotAny = ExpectFalse>> -type _TypeContract_0849_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0849_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0849_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0849_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0849_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0849_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0850_ReturnNotAny = ExpectFalse>> -type _TypeContract_0850_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0850_Param0_RejectsString = ExpectFalse[0]>> -type _TypeContract_0850_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0850_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0850_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0850_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0850_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0850_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0850_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0851_ReturnNotAny = ExpectFalse>> -type _TypeContract_0851_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0851_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0851_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0851_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0851_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0851_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0852_ReturnNotAny = ExpectFalse>> -type _TypeContract_0852_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0852_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0852_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0852_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0852_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0852_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0853_ReturnNotAny = ExpectFalse>> -type _TypeContract_0853_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0853_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0853_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0853_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0853_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0853_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0854_ReturnNotAny = ExpectFalse>> -type _TypeContract_0854_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0854_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0854_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0855_ReturnNotAny = ExpectFalse>> -type _TypeContract_0855_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0855_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0855_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0856_ReturnNotAny = ExpectFalse>> -type _TypeContract_0856_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0856_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0856_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0857_ReturnNotAny = ExpectFalse>> -type _TypeContract_0857_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0857_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0857_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0858_ReturnNotAny = ExpectFalse>> -type _TypeContract_0858_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0858_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0858_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0859_ReturnNotAny = ExpectFalse>> -type _TypeContract_0859_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0859_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0859_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0859_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0859_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0859_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0860_ReturnNotAny = ExpectFalse>> -type _TypeContract_0860_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0860_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0860_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0860_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0860_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0860_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0861_ReturnNotAny = ExpectFalse>> -type _TypeContract_0861_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0861_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0861_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0861_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0861_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0861_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0862_ReturnNotAny = ExpectFalse>> -type _TypeContract_0862_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0862_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0862_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0862_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0862_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0862_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0862_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0862_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0862_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0862_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0862_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0862_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0862_Param3_RejectsString = ExpectFalse[3]>> -type _TypeContract_0862_Param3_RejectsBoolean = ExpectFalse[3]>> -type _TypeContract_0863_ReturnNotAny = ExpectFalse>> -type _TypeContract_0863_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0863_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0863_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0863_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0863_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0863_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0863_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0863_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0863_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0863_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0864_ReturnNotAny = ExpectFalse>> -type _TypeContract_0864_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0864_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0864_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0864_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0864_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0864_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0864_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0864_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0864_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0864_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0864_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0865_ReturnNotAny = ExpectFalse>> -type _TypeContract_0865_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0865_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0865_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0865_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0865_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0865_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0865_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0865_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0865_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0865_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0865_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0865_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0866_ReturnNotAny = ExpectFalse>> -type _TypeContract_0866_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0866_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0866_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0866_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0866_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0866_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0866_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0867_ReturnNotAny = ExpectFalse>> -type _TypeContract_0867_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0867_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0867_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0867_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0867_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0867_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0868_ReturnNotAny = ExpectFalse>> -type _TypeContract_0868_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0868_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0868_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0868_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0868_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0868_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0869_ReturnNotAny = ExpectFalse>> -type _TypeContract_0869_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0869_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0869_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0869_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0869_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0869_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0869_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0869_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0869_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0869_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0870_ReturnNotAny = ExpectFalse>> -type _TypeContract_0870_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0870_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0870_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0870_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0870_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0870_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0870_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0870_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> -type _TypeContract_0870_Param2_RejectsString = ExpectFalse[2]>> -type _TypeContract_0870_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0871_ReturnNotAny = ExpectFalse>> -type _TypeContract_0871_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0871_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0871_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0872_ReturnNotAny = ExpectFalse>> -type _TypeContract_0872_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0872_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0872_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0872_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0873_ReturnNotAny = ExpectFalse>> -type _TypeContract_0873_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0873_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0873_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0873_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0873_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0873_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0874_ReturnNotAny = ExpectFalse>> -type _TypeContract_0874_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0874_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0874_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0874_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0874_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0874_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0874_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0875_ReturnNotAny = ExpectFalse>> -type _TypeContract_0875_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0875_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0875_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0875_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0875_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0875_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0875_Param2_NotAny = ExpectFalse[2]>> -type _TypeContract_0875_Param2_RejectsNumber = ExpectFalse[2]>> -type _TypeContract_0875_Param2_RejectsBoolean = ExpectFalse[2]>> -type _TypeContract_0875_Param3_NotAny = ExpectFalse[3]>> -type _TypeContract_0875_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> -type _TypeContract_0875_Param4_NotAny = ExpectFalse[4]>> -type _TypeContract_0875_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> -type _TypeContract_0876_ReturnNotAny = ExpectFalse>> -type _TypeContract_0876_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0876_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0876_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0876_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0876_Param1_RejectsString = ExpectFalse[1]>> -type _TypeContract_0876_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0877_ReturnNotAny = ExpectFalse>> -type _TypeContract_0877_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0877_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0877_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0878_ReturnNotAny = ExpectFalse>> -type _TypeContract_0878_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0878_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0878_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0879_ReturnNotAny = ExpectFalse>> -type _TypeContract_0879_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0879_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0879_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0880_ReturnNotAny = ExpectFalse>> -type _TypeContract_0880_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0880_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0880_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0880_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0880_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0880_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0880_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0881_ReturnNotAny = ExpectFalse>> -type _TypeContract_0881_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0881_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0881_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0881_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0881_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0881_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0881_Param1_RejectsBoolean = ExpectFalse[1]>> -type _TypeContract_0882_ReturnNotAny = ExpectFalse>> -type _TypeContract_0882_Param0_NotAny = ExpectFalse[0]>> -type _TypeContract_0882_Param0_RejectsNumber = ExpectFalse[0]>> -type _TypeContract_0882_Param0_RejectsBoolean = ExpectFalse[0]>> -type _TypeContract_0882_Param1_NotAny = ExpectFalse[1]>> -type _TypeContract_0882_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> -type _TypeContract_0882_Param1_RejectsNumber = ExpectFalse[1]>> -type _TypeContract_0882_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0621_ReturnNotAny = ExpectFalse>> +type _TypeContract_0621_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0621_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0621_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0621_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0622_ReturnNotAny = ExpectFalse>> +type _TypeContract_0622_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0623_ReturnNotAny = ExpectFalse>> +type _TypeContract_0623_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0624_ReturnNotAny = ExpectFalse>> +type _TypeContract_0624_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0624_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0625_ReturnNotAny = ExpectFalse>> +type _TypeContract_0625_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0625_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0626_ReturnNotAny = ExpectFalse>> +type _TypeContract_0626_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0627_ReturnNotAny = ExpectFalse>> +type _TypeContract_0627_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0627_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0628_ReturnNotAny = ExpectFalse>> +type _TypeContract_0628_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0628_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0629_ReturnNotAny = ExpectFalse>> +type _TypeContract_0629_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0630_ReturnNotAny = ExpectFalse>> +type _TypeContract_0630_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0631_ReturnNotAny = ExpectFalse>> +type _TypeContract_0631_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0631_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0632_ReturnNotAny = ExpectFalse>> +type _TypeContract_0632_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0632_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0633_ReturnNotAny = ExpectFalse>> +type _TypeContract_0633_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0633_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0633_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0634_ReturnNotAny = ExpectFalse>> +type _TypeContract_0634_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0635_ReturnNotAny = ExpectFalse>> +type _TypeContract_0635_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0636_ReturnNotAny = ExpectFalse>> +type _TypeContract_0636_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0636_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0636_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0636_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0637_ReturnNotAny = ExpectFalse>> +type _TypeContract_0637_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0637_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0637_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0637_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0638_ReturnNotAny = ExpectFalse>> +type _TypeContract_0638_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0638_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0638_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0638_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0639_ReturnNotAny = ExpectFalse>> +type _TypeContract_0639_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0639_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0639_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0639_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0640_ReturnNotAny = ExpectFalse>> +type _TypeContract_0640_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0640_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0640_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0640_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0641_ReturnNotAny = ExpectFalse>> +type _TypeContract_0641_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0641_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0641_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0641_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0642_ReturnNotAny = ExpectFalse>> +type _TypeContract_0642_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0643_ReturnNotAny = ExpectFalse>> +type _TypeContract_0643_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0644_ReturnNotAny = ExpectFalse>> +type _TypeContract_0644_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0644_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0644_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0644_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0644_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0645_ReturnNotAny = ExpectFalse>> +type _TypeContract_0645_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0645_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0645_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0645_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0645_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0646_ReturnNotAny = ExpectFalse>> +type _TypeContract_0646_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0646_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0646_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0646_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0646_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0647_ReturnNotAny = ExpectFalse>> +type _TypeContract_0647_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0647_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0647_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0647_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0647_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0648_ReturnNotAny = ExpectFalse>> +type _TypeContract_0648_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0648_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0648_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0648_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0648_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0649_ReturnNotAny = ExpectFalse>> +type _TypeContract_0649_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0649_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0649_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0649_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0649_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0650_ReturnNotAny = ExpectFalse>> +type _TypeContract_0650_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0650_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0650_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0650_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0650_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0651_ReturnNotAny = ExpectFalse>> +type _TypeContract_0651_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0651_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0651_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0651_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0651_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0652_ReturnNotAny = ExpectFalse>> +type _TypeContract_0652_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0652_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0652_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0652_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0652_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0653_ReturnNotAny = ExpectFalse>> +type _TypeContract_0653_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0653_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0653_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0653_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0653_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0654_ReturnNotAny = ExpectFalse>> +type _TypeContract_0654_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0654_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0654_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0654_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0654_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0655_ReturnNotAny = ExpectFalse>> +type _TypeContract_0655_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0655_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0655_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0655_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0655_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0656_ReturnNotAny = ExpectFalse>> +type _TypeContract_0656_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0656_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0656_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0656_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0657_ReturnNotAny = ExpectFalse>> +type _TypeContract_0657_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0657_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0657_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0657_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0658_ReturnNotAny = ExpectFalse>> +type _TypeContract_0658_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0658_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0659_ReturnNotAny = ExpectFalse>> +type _TypeContract_0659_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0659_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0660_ReturnNotAny = ExpectFalse>> +type _TypeContract_0660_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0660_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0660_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0660_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0660_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0661_ReturnNotAny = ExpectFalse>> +type _TypeContract_0661_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0661_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0662_ReturnNotAny = ExpectFalse>> +type _TypeContract_0662_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0662_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0663_ReturnNotAny = ExpectFalse>> +type _TypeContract_0663_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0663_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0664_ReturnNotAny = ExpectFalse>> +type _TypeContract_0664_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0664_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0665_ReturnNotAny = ExpectFalse>> +type _TypeContract_0665_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0665_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0666_ReturnNotAny = ExpectFalse>> +type _TypeContract_0666_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0666_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0666_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0666_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0667_ReturnNotAny = ExpectFalse>> +type _TypeContract_0667_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0667_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0667_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0667_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0668_ReturnNotAny = ExpectFalse>> +type _TypeContract_0668_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0668_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0668_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0668_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0669_ReturnNotAny = ExpectFalse>> +type _TypeContract_0669_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0669_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0669_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0669_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0670_ReturnNotAny = ExpectFalse>> +type _TypeContract_0670_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0670_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0670_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0671_ReturnNotAny = ExpectFalse>> +type _TypeContract_0671_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0671_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0671_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0671_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0671_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0671_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0671_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0671_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0671_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0671_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0671_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0672_ReturnNotAny = ExpectFalse>> +type _TypeContract_0672_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0673_ReturnNotAny = ExpectFalse>> +type _TypeContract_0673_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0673_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0674_ReturnNotAny = ExpectFalse>> +type _TypeContract_0674_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0675_ReturnNotAny = ExpectFalse>> +type _TypeContract_0675_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0675_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0675_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0675_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0676_ReturnNotAny = ExpectFalse>> +type _TypeContract_0676_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0676_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0676_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0676_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0676_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0676_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0676_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0676_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0676_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0676_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0676_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0676_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0676_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0676_Param4_NotAny = ExpectFalse[4]>> +type _TypeContract_0676_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> +type _TypeContract_0676_Param4_RejectsString = ExpectFalse[4]>> +type _TypeContract_0676_Param4_RejectsBoolean = ExpectFalse[4]>> +type _TypeContract_0677_ReturnNotAny = ExpectFalse>> +type _TypeContract_0677_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0677_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0677_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0677_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0677_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0677_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0677_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0677_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0677_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0678_ReturnNotAny = ExpectFalse>> +type _TypeContract_0678_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0679_ReturnNotAny = ExpectFalse>> +type _TypeContract_0679_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0679_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0680_ReturnNotAny = ExpectFalse>> +type _TypeContract_0680_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0680_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0680_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0680_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0680_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0680_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0680_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0680_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0680_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0680_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0681_ReturnNotAny = ExpectFalse>> +type _TypeContract_0681_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0681_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0682_ReturnNotAny = ExpectFalse>> +type _TypeContract_0682_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0682_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0683_ReturnNotAny = ExpectFalse>> +type _TypeContract_0683_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0684_ReturnNotAny = ExpectFalse>> +type _TypeContract_0684_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0684_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0685_ReturnNotAny = ExpectFalse>> +type _TypeContract_0685_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0685_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0685_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0686_ReturnNotAny = ExpectFalse>> +type _TypeContract_0686_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0687_ReturnNotAny = ExpectFalse>> +type _TypeContract_0687_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0687_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0687_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0687_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0687_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0687_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0687_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0687_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0687_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0687_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0687_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0687_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0688_ReturnNotAny = ExpectFalse>> +type _TypeContract_0688_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0688_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0688_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0688_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0688_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0688_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0689_ReturnNotAny = ExpectFalse>> +type _TypeContract_0689_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0689_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0689_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0690_ReturnNotAny = ExpectFalse>> +type _TypeContract_0690_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0690_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0691_ReturnNotAny = ExpectFalse>> +type _TypeContract_0691_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0692_ReturnNotAny = ExpectFalse>> +type _TypeContract_0692_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0692_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0693_ReturnNotAny = ExpectFalse>> +type _TypeContract_0693_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0693_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0694_ReturnNotAny = ExpectFalse>> +type _TypeContract_0694_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0694_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0695_ReturnNotAny = ExpectFalse>> +type _TypeContract_0695_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0695_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0696_ReturnNotAny = ExpectFalse>> +type _TypeContract_0696_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0697_ReturnNotAny = ExpectFalse>> +type _TypeContract_0697_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0697_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0697_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0698_ReturnNotAny = ExpectFalse>> +type _TypeContract_0698_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0699_ReturnNotAny = ExpectFalse>> +type _TypeContract_0699_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0700_ReturnNotAny = ExpectFalse>> +type _TypeContract_0700_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0700_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0700_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0701_ReturnNotAny = ExpectFalse>> +type _TypeContract_0701_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0701_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0701_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0702_ReturnNotAny = ExpectFalse>> +type _TypeContract_0702_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0702_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0702_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0703_ReturnNotAny = ExpectFalse>> +type _TypeContract_0703_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0703_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0703_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0704_ReturnNotAny = ExpectFalse>> +type _TypeContract_0704_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0704_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0704_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0705_ReturnNotAny = ExpectFalse>> +type _TypeContract_0705_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0705_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0705_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0705_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0705_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0705_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0706_ReturnNotAny = ExpectFalse>> +type _TypeContract_0706_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0706_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0706_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0707_ReturnNotAny = ExpectFalse>> +type _TypeContract_0707_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0707_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0707_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0708_ReturnNotAny = ExpectFalse>> +type _TypeContract_0708_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0708_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0708_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0708_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0709_ReturnNotAny = ExpectFalse>> +type _TypeContract_0709_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0709_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0709_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0709_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0709_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0709_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0710_ReturnNotAny = ExpectFalse>> +type _TypeContract_0710_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0710_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0710_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0711_ReturnNotAny = ExpectFalse>> +type _TypeContract_0711_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0711_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0711_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0712_ReturnNotAny = ExpectFalse>> +type _TypeContract_0712_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0712_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0712_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0713_ReturnNotAny = ExpectFalse>> +type _TypeContract_0713_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0713_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0714_ReturnNotAny = ExpectFalse>> +type _TypeContract_0714_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0714_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0714_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0715_ReturnNotAny = ExpectFalse>> +type _TypeContract_0715_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0715_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0715_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0716_ReturnNotAny = ExpectFalse>> +type _TypeContract_0716_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0716_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0716_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0717_ReturnNotAny = ExpectFalse>> +type _TypeContract_0717_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0717_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0718_ReturnNotAny = ExpectFalse>> +type _TypeContract_0718_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0718_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0718_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0719_ReturnNotAny = ExpectFalse>> +type _TypeContract_0719_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0720_ReturnNotAny = ExpectFalse>> +type _TypeContract_0720_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0720_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0720_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0720_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0721_ReturnNotAny = ExpectFalse>> +type _TypeContract_0721_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0722_ReturnNotAny = ExpectFalse>> +type _TypeContract_0722_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0722_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0722_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0722_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0722_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0722_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0722_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0722_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0722_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0722_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0723_ReturnNotAny = ExpectFalse>> +type _TypeContract_0723_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0723_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0723_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0724_ReturnNotAny = ExpectFalse>> +type _TypeContract_0724_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0724_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0724_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0725_ReturnNotAny = ExpectFalse>> +type _TypeContract_0725_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0725_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0725_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0726_ReturnNotAny = ExpectFalse>> +type _TypeContract_0726_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0726_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0727_ReturnNotAny = ExpectFalse>> +type _TypeContract_0727_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0728_ReturnNotAny = ExpectFalse>> +type _TypeContract_0728_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0728_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0728_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0728_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0728_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0728_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0729_ReturnNotAny = ExpectFalse>> +type _TypeContract_0729_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0729_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0729_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0730_ReturnNotAny = ExpectFalse>> +type _TypeContract_0730_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0730_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0730_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0731_ReturnNotAny = ExpectFalse>> +type _TypeContract_0731_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0731_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0731_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0731_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0731_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0731_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0732_ReturnNotAny = ExpectFalse>> +type _TypeContract_0732_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0732_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0732_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0732_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0733_ReturnNotAny = ExpectFalse>> +type _TypeContract_0733_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0733_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0733_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0734_ReturnNotAny = ExpectFalse>> +type _TypeContract_0734_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0734_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0734_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0735_ReturnNotAny = ExpectFalse>> +type _TypeContract_0735_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0735_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0735_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0736_ReturnNotAny = ExpectFalse>> +type _TypeContract_0736_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0736_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0736_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0737_ReturnNotAny = ExpectFalse>> +type _TypeContract_0737_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0737_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0737_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0738_ReturnNotAny = ExpectFalse>> +type _TypeContract_0738_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0738_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0738_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0739_ReturnNotAny = ExpectFalse>> +type _TypeContract_0739_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0739_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0739_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0740_ReturnNotAny = ExpectFalse>> +type _TypeContract_0740_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0741_ReturnNotAny = ExpectFalse>> +type _TypeContract_0741_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0741_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0742_ReturnNotAny = ExpectFalse>> +type _TypeContract_0742_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0742_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0743_ReturnNotAny = ExpectFalse>> +type _TypeContract_0743_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0743_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0744_ReturnNotAny = ExpectFalse>> +type _TypeContract_0744_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0744_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0745_ReturnNotAny = ExpectFalse>> +type _TypeContract_0745_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0745_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0746_ReturnNotAny = ExpectFalse>> +type _TypeContract_0746_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0746_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0747_ReturnNotAny = ExpectFalse>> +type _TypeContract_0747_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0747_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0748_ReturnNotAny = ExpectFalse>> +type _TypeContract_0748_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0748_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0749_ReturnNotAny = ExpectFalse>> +type _TypeContract_0749_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0749_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0750_ReturnNotAny = ExpectFalse>> +type _TypeContract_0750_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0750_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0751_ReturnNotAny = ExpectFalse>> +type _TypeContract_0751_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0751_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0752_ReturnNotAny = ExpectFalse>> +type _TypeContract_0752_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0753_ReturnNotAny = ExpectFalse>> +type _TypeContract_0753_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0754_ReturnNotAny = ExpectFalse>> +type _TypeContract_0754_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0754_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0755_ReturnNotAny = ExpectFalse>> +type _TypeContract_0755_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0755_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0756_ReturnNotAny = ExpectFalse>> +type _TypeContract_0756_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0756_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0757_ReturnNotAny = ExpectFalse>> +type _TypeContract_0757_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0757_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0758_ReturnNotAny = ExpectFalse>> +type _TypeContract_0758_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0758_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0759_ReturnNotAny = ExpectFalse>> +type _TypeContract_0759_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0759_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0760_ReturnNotAny = ExpectFalse>> +type _TypeContract_0760_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0760_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0761_ReturnNotAny = ExpectFalse>> +type _TypeContract_0761_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0761_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0762_ReturnNotAny = ExpectFalse>> +type _TypeContract_0762_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0763_ReturnNotAny = ExpectFalse>> +type _TypeContract_0763_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0764_ReturnNotAny = ExpectFalse>> +type _TypeContract_0764_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0764_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0765_ReturnNotAny = ExpectFalse>> +type _TypeContract_0765_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0766_ReturnNotAny = ExpectFalse>> +type _TypeContract_0766_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0766_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0767_ReturnNotAny = ExpectFalse>> +type _TypeContract_0767_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0767_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0768_ReturnNotAny = ExpectFalse>> +type _TypeContract_0768_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0768_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0769_ReturnNotAny = ExpectFalse>> +type _TypeContract_0769_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0769_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0770_ReturnNotAny = ExpectFalse>> +type _TypeContract_0770_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0771_ReturnNotAny = ExpectFalse>> +type _TypeContract_0771_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0771_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0772_ReturnNotAny = ExpectFalse>> +type _TypeContract_0772_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0772_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0772_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0772_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0772_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0772_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0772_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0772_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0772_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0773_ReturnNotAny = ExpectFalse>> +type _TypeContract_0773_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0773_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0773_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0773_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0773_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0773_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0773_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0773_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0773_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0774_ReturnNotAny = ExpectFalse>> +type _TypeContract_0774_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0774_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0774_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0774_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0774_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0774_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0774_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0774_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0774_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0774_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0774_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0774_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0774_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0774_Param4_NotAny = ExpectFalse[4]>> +type _TypeContract_0774_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> +type _TypeContract_0774_Param4_RejectsBoolean = ExpectFalse[4]>> +type _TypeContract_0775_ReturnNotAny = ExpectFalse>> +type _TypeContract_0775_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0775_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0775_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0775_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0775_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0775_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0775_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0775_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0775_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0775_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0775_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0775_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0775_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0775_Param4_NotAny = ExpectFalse[4]>> +type _TypeContract_0775_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> +type _TypeContract_0775_Param4_RejectsBoolean = ExpectFalse[4]>> +type _TypeContract_0776_ReturnNotAny = ExpectFalse>> +type _TypeContract_0776_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0776_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0776_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0776_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0776_Param2_AcceptsKnownLiteral = ExpectTrue[2]>> +type _TypeContract_0776_Param2_RejectsInvalidLiteral = ExpectFalse[2]>> +type _TypeContract_0777_ReturnNotAny = ExpectFalse>> +type _TypeContract_0777_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0777_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0778_ReturnNotAny = ExpectFalse>> +type _TypeContract_0778_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0778_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0778_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0779_ReturnNotAny = ExpectFalse>> +type _TypeContract_0779_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0780_ReturnNotAny = ExpectFalse>> +type _TypeContract_0780_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0780_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0780_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0781_ReturnNotAny = ExpectFalse>> +type _TypeContract_0781_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0781_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0781_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0781_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0782_ReturnNotAny = ExpectFalse>> +type _TypeContract_0782_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0783_ReturnNotAny = ExpectFalse>> +type _TypeContract_0783_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0784_ReturnNotAny = ExpectFalse>> +type _TypeContract_0784_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0784_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0784_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0784_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0784_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0785_ReturnNotAny = ExpectFalse>> +type _TypeContract_0785_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0786_ReturnNotAny = ExpectFalse>> +type _TypeContract_0786_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0787_ReturnNotAny = ExpectFalse>> +type _TypeContract_0787_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0788_ReturnNotAny = ExpectFalse>> +type _TypeContract_0788_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0789_ReturnNotAny = ExpectFalse>> +type _TypeContract_0789_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0789_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0789_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0789_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0789_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0790_ReturnNotAny = ExpectFalse>> +type _TypeContract_0790_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0790_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0790_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0790_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0790_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0791_ReturnNotAny = ExpectFalse>> +type _TypeContract_0791_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0791_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0791_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0791_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0791_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0791_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0791_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0791_Param2_AcceptsKnownLiteral = ExpectTrue[2]>> +type _TypeContract_0791_Param2_RejectsInvalidLiteral = ExpectFalse[2]>> +type _TypeContract_0792_ReturnNotAny = ExpectFalse>> +type _TypeContract_0792_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0792_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0792_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0792_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0792_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0793_ReturnNotAny = ExpectFalse>> +type _TypeContract_0793_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0793_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0793_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0793_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0793_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0794_ReturnNotAny = ExpectFalse>> +type _TypeContract_0795_ReturnNotAny = ExpectFalse>> +type _TypeContract_0796_ReturnNotAny = ExpectFalse>> +type _TypeContract_0797_ReturnNotAny = ExpectFalse>> +type _TypeContract_0797_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0797_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0797_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0798_ReturnNotAny = ExpectFalse>> +type _TypeContract_0799_ReturnNotAny = ExpectFalse>> +type _TypeContract_0800_ReturnNotAny = ExpectFalse>> +type _TypeContract_0801_ReturnNotAny = ExpectFalse>> +type _TypeContract_0802_ReturnNotAny = ExpectFalse>> +type _TypeContract_0803_ReturnNotAny = ExpectFalse>> +type _TypeContract_0804_ReturnNotAny = ExpectFalse>> +type _TypeContract_0804_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0804_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0804_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0805_ReturnNotAny = ExpectFalse>> +type _TypeContract_0805_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0805_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0805_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0806_ReturnNotAny = ExpectFalse>> +type _TypeContract_0806_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0806_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0806_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0807_ReturnNotAny = ExpectFalse>> +type _TypeContract_0807_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0807_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0807_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0807_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0807_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0807_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0807_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0808_ReturnNotAny = ExpectFalse>> +type _TypeContract_0808_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0809_ReturnNotAny = ExpectFalse>> +type _TypeContract_0809_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0810_ReturnNotAny = ExpectFalse>> +type _TypeContract_0810_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0810_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0810_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0811_ReturnNotAny = ExpectFalse>> +type _TypeContract_0811_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0811_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0811_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0811_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0811_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0811_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0811_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0812_ReturnNotAny = ExpectFalse>> +type _TypeContract_0812_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0812_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0812_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0812_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0812_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0812_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0812_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0812_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0812_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0812_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0812_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0812_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0812_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0812_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0812_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0813_ReturnNotAny = ExpectFalse>> +type _TypeContract_0813_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0813_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0813_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0814_ReturnNotAny = ExpectFalse>> +type _TypeContract_0814_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0814_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0814_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0815_ReturnNotAny = ExpectFalse>> +type _TypeContract_0815_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0815_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0815_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0816_ReturnNotAny = ExpectFalse>> +type _TypeContract_0816_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0816_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0816_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0817_ReturnNotAny = ExpectFalse>> +type _TypeContract_0817_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0817_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0818_ReturnNotAny = ExpectFalse>> +type _TypeContract_0818_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0818_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0819_ReturnNotAny = ExpectFalse>> +type _TypeContract_0819_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0820_ReturnNotAny = ExpectFalse>> +type _TypeContract_0820_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0820_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0821_ReturnNotAny = ExpectFalse>> +type _TypeContract_0821_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0821_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0821_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0821_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0821_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0822_ReturnNotAny = ExpectFalse>> +type _TypeContract_0822_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0822_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0822_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0822_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0822_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0823_ReturnNotAny = ExpectFalse>> +type _TypeContract_0823_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0824_ReturnNotAny = ExpectFalse>> +type _TypeContract_0824_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0824_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0824_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0824_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0824_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0825_ReturnNotAny = ExpectFalse>> +type _TypeContract_0825_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0825_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0825_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0825_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0825_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0826_ReturnNotAny = ExpectFalse>> +type _TypeContract_0826_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0826_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0826_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0826_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0826_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0827_ReturnNotAny = ExpectFalse>> +type _TypeContract_0827_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0827_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0828_ReturnNotAny = ExpectFalse>> +type _TypeContract_0828_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0829_ReturnNotAny = ExpectFalse>> +type _TypeContract_0829_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0830_ReturnNotAny = ExpectFalse>> +type _TypeContract_0830_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0830_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0831_ReturnNotAny = ExpectFalse>> +type _TypeContract_0831_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0831_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0831_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0832_ReturnNotAny = ExpectFalse>> +type _TypeContract_0832_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0832_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0832_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0833_ReturnNotAny = ExpectFalse>> +type _TypeContract_0833_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0833_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0833_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0834_ReturnNotAny = ExpectFalse>> +type _TypeContract_0834_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0834_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0834_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0835_ReturnNotAny = ExpectFalse>> +type _TypeContract_0835_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0835_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0835_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0836_ReturnNotAny = ExpectFalse>> +type _TypeContract_0836_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0836_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0836_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0837_ReturnNotAny = ExpectFalse>> +type _TypeContract_0837_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0837_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0837_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0838_ReturnNotAny = ExpectFalse>> +type _TypeContract_0838_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0838_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0838_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0839_ReturnNotAny = ExpectFalse>> +type _TypeContract_0839_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0839_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0839_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0840_ReturnNotAny = ExpectFalse>> +type _TypeContract_0840_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0840_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0840_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0841_ReturnNotAny = ExpectFalse>> +type _TypeContract_0841_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0841_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0841_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0842_ReturnNotAny = ExpectFalse>> +type _TypeContract_0842_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0842_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0842_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0843_ReturnNotAny = ExpectFalse>> +type _TypeContract_0843_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0843_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0843_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0844_ReturnNotAny = ExpectFalse>> +type _TypeContract_0844_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0844_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0844_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0845_ReturnNotAny = ExpectFalse>> +type _TypeContract_0845_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0845_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0845_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0846_ReturnNotAny = ExpectFalse>> +type _TypeContract_0846_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0846_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0846_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0847_ReturnNotAny = ExpectFalse>> +type _TypeContract_0847_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0847_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0847_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0847_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0847_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0847_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0847_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0848_ReturnNotAny = ExpectFalse>> +type _TypeContract_0848_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0848_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0848_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0849_ReturnNotAny = ExpectFalse>> +type _TypeContract_0849_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0849_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0849_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0849_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0849_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0849_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0850_ReturnNotAny = ExpectFalse>> +type _TypeContract_0850_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0850_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0850_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0850_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0850_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0850_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0851_ReturnNotAny = ExpectFalse>> +type _TypeContract_0851_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0851_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0851_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0852_ReturnNotAny = ExpectFalse>> +type _TypeContract_0852_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0852_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0852_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0852_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0852_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0852_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0853_ReturnNotAny = ExpectFalse>> +type _TypeContract_0853_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0853_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0853_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0853_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0853_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0853_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0853_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0853_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0853_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0854_ReturnNotAny = ExpectFalse>> +type _TypeContract_0854_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0854_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0854_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0854_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0854_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0854_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0855_ReturnNotAny = ExpectFalse>> +type _TypeContract_0855_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0855_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0855_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0856_ReturnNotAny = ExpectFalse>> +type _TypeContract_0856_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0856_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0856_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0857_ReturnNotAny = ExpectFalse>> +type _TypeContract_0857_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0857_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0857_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0857_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0857_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0857_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0858_ReturnNotAny = ExpectFalse>> +type _TypeContract_0858_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0858_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0858_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0859_ReturnNotAny = ExpectFalse>> +type _TypeContract_0859_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0859_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0859_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0859_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0859_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0859_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0859_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0859_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0859_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0860_ReturnNotAny = ExpectFalse>> +type _TypeContract_0860_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0860_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0860_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0861_ReturnNotAny = ExpectFalse>> +type _TypeContract_0861_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0861_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0861_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0861_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0861_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0861_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0862_ReturnNotAny = ExpectFalse>> +type _TypeContract_0862_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0862_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0862_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0862_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0862_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0862_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0863_ReturnNotAny = ExpectFalse>> +type _TypeContract_0863_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0863_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0863_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0863_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0863_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0863_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0864_ReturnNotAny = ExpectFalse>> +type _TypeContract_0864_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0864_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0864_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0865_ReturnNotAny = ExpectFalse>> +type _TypeContract_0865_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0865_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0865_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0866_ReturnNotAny = ExpectFalse>> +type _TypeContract_0866_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0866_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0866_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0866_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0866_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0866_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0867_ReturnNotAny = ExpectFalse>> +type _TypeContract_0867_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0867_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0867_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0867_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0867_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0867_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0867_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0867_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0867_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0868_ReturnNotAny = ExpectFalse>> +type _TypeContract_0868_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0868_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0868_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0868_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0868_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0868_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0869_ReturnNotAny = ExpectFalse>> +type _TypeContract_0869_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0869_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0869_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0869_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0869_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0869_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0870_ReturnNotAny = ExpectFalse>> +type _TypeContract_0870_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0870_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0870_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0870_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0870_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0870_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0871_ReturnNotAny = ExpectFalse>> +type _TypeContract_0871_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0871_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0871_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0871_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0871_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0871_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0871_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0871_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0871_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0872_ReturnNotAny = ExpectFalse>> +type _TypeContract_0872_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0872_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0872_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0872_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0872_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0872_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0873_ReturnNotAny = ExpectFalse>> +type _TypeContract_0873_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0873_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0873_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0873_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0873_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0873_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0874_ReturnNotAny = ExpectFalse>> +type _TypeContract_0874_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0874_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0874_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0874_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0874_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0874_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0875_ReturnNotAny = ExpectFalse>> +type _TypeContract_0875_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0875_Param0_RejectsString = ExpectFalse[0]>> +type _TypeContract_0875_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0875_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0875_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0875_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0875_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0875_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0875_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0876_ReturnNotAny = ExpectFalse>> +type _TypeContract_0876_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0876_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0876_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0876_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0876_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0876_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0877_ReturnNotAny = ExpectFalse>> +type _TypeContract_0877_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0877_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0877_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0877_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0877_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0877_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0878_ReturnNotAny = ExpectFalse>> +type _TypeContract_0878_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0878_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0878_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0878_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0878_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0878_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0879_ReturnNotAny = ExpectFalse>> +type _TypeContract_0879_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0879_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0879_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0880_ReturnNotAny = ExpectFalse>> +type _TypeContract_0880_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0880_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0880_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0881_ReturnNotAny = ExpectFalse>> +type _TypeContract_0881_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0881_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0881_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0882_ReturnNotAny = ExpectFalse>> +type _TypeContract_0882_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0882_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0882_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0883_ReturnNotAny = ExpectFalse>> +type _TypeContract_0883_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0883_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0883_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0884_ReturnNotAny = ExpectFalse>> +type _TypeContract_0884_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0884_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0884_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0884_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0884_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0884_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0885_ReturnNotAny = ExpectFalse>> +type _TypeContract_0885_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0885_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0885_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0885_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0885_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0885_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0886_ReturnNotAny = ExpectFalse>> +type _TypeContract_0886_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0886_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0886_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0886_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0886_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0886_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0887_ReturnNotAny = ExpectFalse>> +type _TypeContract_0887_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0887_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0887_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0887_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0887_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0887_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0887_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0887_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0887_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0887_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0887_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0887_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0887_Param3_RejectsString = ExpectFalse[3]>> +type _TypeContract_0887_Param3_RejectsBoolean = ExpectFalse[3]>> +type _TypeContract_0888_ReturnNotAny = ExpectFalse>> +type _TypeContract_0888_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0888_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0888_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0888_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0888_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0888_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0888_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0888_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0888_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0888_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0889_ReturnNotAny = ExpectFalse>> +type _TypeContract_0889_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0889_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0889_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0889_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0889_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0889_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0889_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0889_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0889_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0889_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0889_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0890_ReturnNotAny = ExpectFalse>> +type _TypeContract_0890_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0890_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0890_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0890_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0890_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0890_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0890_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0890_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0890_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0890_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0890_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0890_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0891_ReturnNotAny = ExpectFalse>> +type _TypeContract_0891_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0891_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0891_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0891_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0891_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0891_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0891_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0892_ReturnNotAny = ExpectFalse>> +type _TypeContract_0892_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0892_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0892_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0892_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0892_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0892_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0893_ReturnNotAny = ExpectFalse>> +type _TypeContract_0893_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0893_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0893_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0893_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0893_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0893_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0894_ReturnNotAny = ExpectFalse>> +type _TypeContract_0894_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0894_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0894_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0894_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0894_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0894_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0894_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0894_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0894_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0894_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0895_ReturnNotAny = ExpectFalse>> +type _TypeContract_0895_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0895_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0895_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0895_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0895_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0895_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0895_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0895_Param2_OptionalAcceptsUndefined = ExpectTrue[2]>> +type _TypeContract_0895_Param2_RejectsString = ExpectFalse[2]>> +type _TypeContract_0895_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0896_ReturnNotAny = ExpectFalse>> +type _TypeContract_0896_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0896_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0896_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0897_ReturnNotAny = ExpectFalse>> +type _TypeContract_0897_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0897_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0897_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0897_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0898_ReturnNotAny = ExpectFalse>> +type _TypeContract_0898_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0898_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0898_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0898_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0898_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0898_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0899_ReturnNotAny = ExpectFalse>> +type _TypeContract_0899_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0899_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0899_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0899_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0899_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0899_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0899_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0900_ReturnNotAny = ExpectFalse>> +type _TypeContract_0900_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0900_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0900_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0900_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0900_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0900_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0900_Param2_NotAny = ExpectFalse[2]>> +type _TypeContract_0900_Param2_RejectsNumber = ExpectFalse[2]>> +type _TypeContract_0900_Param2_RejectsBoolean = ExpectFalse[2]>> +type _TypeContract_0900_Param3_NotAny = ExpectFalse[3]>> +type _TypeContract_0900_Param3_OptionalAcceptsUndefined = ExpectTrue[3]>> +type _TypeContract_0900_Param4_NotAny = ExpectFalse[4]>> +type _TypeContract_0900_Param4_OptionalAcceptsUndefined = ExpectTrue[4]>> +type _TypeContract_0901_ReturnNotAny = ExpectFalse>> +type _TypeContract_0901_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0901_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0901_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0901_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0901_Param1_RejectsString = ExpectFalse[1]>> +type _TypeContract_0901_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0902_ReturnNotAny = ExpectFalse>> +type _TypeContract_0902_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0902_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0902_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0903_ReturnNotAny = ExpectFalse>> +type _TypeContract_0903_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0903_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0903_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0904_ReturnNotAny = ExpectFalse>> +type _TypeContract_0904_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0904_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0904_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0905_ReturnNotAny = ExpectFalse>> +type _TypeContract_0905_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0905_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0905_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0905_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0905_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0905_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0905_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0906_ReturnNotAny = ExpectFalse>> +type _TypeContract_0906_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0906_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0906_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0906_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0906_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0906_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0906_Param1_RejectsBoolean = ExpectFalse[1]>> +type _TypeContract_0907_ReturnNotAny = ExpectFalse>> +type _TypeContract_0907_Param0_NotAny = ExpectFalse[0]>> +type _TypeContract_0907_Param0_RejectsNumber = ExpectFalse[0]>> +type _TypeContract_0907_Param0_RejectsBoolean = ExpectFalse[0]>> +type _TypeContract_0907_Param1_NotAny = ExpectFalse[1]>> +type _TypeContract_0907_Param1_OptionalAcceptsUndefined = ExpectTrue[1]>> +type _TypeContract_0907_Param1_RejectsNumber = ExpectFalse[1]>> +type _TypeContract_0907_Param1_RejectsBoolean = ExpectFalse[1]>> diff --git a/website/source/_data/rosetta.yml b/website/source/_data/rosetta.yml index e6e9df3785..58ab5f57a5 100644 --- a/website/source/_data/rosetta.yml +++ b/website/source/_data/rosetta.yml @@ -246,6 +246,36 @@ calendar_format_year: calendar_format_string: - python/calendar/formatstring +iterable_accumulate: + - python/itertools/accumulate + +iterable_batch: + - python/itertools/batched + +iterable_chain: + - python/itertools/chain + +iterable_combinations: + - python/itertools/combinations + +iterable_combinations_with_replacement: + - python/itertools/combinations_with_replacement + +iterable_compress: + - python/itertools/compress + +iterable_slice: + - python/itertools/islice + +iterable_pairwise: + - python/itertools/pairwise + +iterable_product: + - python/itertools/product + +iterable_zip_longest: + - python/itertools/zip_longest + integer_square_root: - python/math/isqrt @@ -333,6 +363,7 @@ numeric_type: - lua/math/type list_permutations: + - python/itertools/permutations - ruby/Array/permutation - haskell/list/permutations diff --git a/website/source/_data/upstream_surface.yml b/website/source/_data/upstream_surface.yml index 9dab05fe40..0dda31567f 100644 --- a/website/source/_data/upstream_surface.yml +++ b/website/source/_data/upstream_surface.yml @@ -1,4 +1,4 @@ -generatedAt: '2026-03-25T23:17:07.576Z' +generatedAt: '2026-03-27T13:05:54.290Z' languages: awk: language: awk @@ -183809,15 +183809,15 @@ languages: This inventory now targets Python's broad official stdlib module surface first, using runtime discovery where possible, rather than the full Python object model or third-party ecosystem. namespaceCount: 283 - shippedCount: 106 + shippedCount: 128 catalogCount: 2184 - catalogShippedCount: 106 + catalogShippedCount: 128 keptExtraCount: 0 unexpectedExtraCount: 0 - wantedCount: 131 + wantedCount: 109 skippedCount: 1947 untriagedCount: 0 - coveragePercent: 5 + coveragePercent: 6 namespaces: - namespace: abc title: abc @@ -185148,15 +185148,23 @@ languages: - week - weekday - weekheader - shippedEntries: [] + shippedEntries: + - calendar + - formatstring + - isleap + - leapdays + - month + - monthcalendar + - monthrange + - timegm + - week + - weekday + - weekheader ignoredLocutusFunctions: [] duplicateLocutusEntries: [] keptExtras: [] unexpectedExtras: [] wantedEntries: - - name: calendar - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - name: different_locale decision: wanted note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. @@ -185166,27 +185174,9 @@ languages: - name: format decision: wanted note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: formatstring - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: isleap - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: leapdays - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - name: main decision: wanted note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: month - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: monthcalendar - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: monthrange - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - name: prcal decision: wanted note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. @@ -185196,27 +185186,16 @@ languages: - name: prweek decision: wanted note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: timegm - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: week - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: weekday - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. - - name: weekheader - decision: wanted - note: Calendar helpers mostly return scalars, strings, or plain arrays with a useful portability contract. skippedEntries: - name: setfirstweekday decision: skip_side_effects note: Global calendar configuration mutates ambient runtime state. untriagedEntries: [] staleDecisions: [] - categories: [] - catalogShippedCount: 0 - coveragePercent: 0 + categories: + - calendar + catalogShippedCount: 11 + coveragePercent: 58 - namespace: cgi title: cgi target: Python 3.12 @@ -190086,12 +190065,53 @@ languages: - takewhile - tee - zip_longest - shippedEntries: [] + shippedEntries: + - accumulate + - batched + - chain + - combinations + - combinations_with_replacement + - compress + - islice + - pairwise + - permutations + - product + - zip_longest ignoredLocutusFunctions: [] duplicateLocutusEntries: [] keptExtras: [] unexpectedExtras: [] wantedEntries: + - name: dropwhile + decision: wanted + note: Predicate-based slicing has a clean plain-value contract. + - name: filterfalse + decision: wanted + note: Predicate-based filtering has a clean plain-value contract. + - name: starmap + decision: wanted + note: Spread-argument mapping still has a clean plain-value contract. + - name: takewhile + decision: wanted + note: Predicate-based slicing has a clean plain-value contract. + skippedEntries: + - name: count + decision: skip_runtime_model + note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. + - name: cycle + decision: skip_runtime_model + note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. + - name: groupby + decision: skip_runtime_model + note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. + - name: repeat + decision: skip_runtime_model + note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. + - name: tee + decision: skip_runtime_model + note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. + untriagedEntries: [] + staleDecisions: - name: accumulate decision: wanted note: Accumulation over plain iterables can be represented as arrays of intermediate results. @@ -190110,12 +190130,6 @@ languages: - name: compress decision: wanted note: Mask-based filtering has a clean plain-value contract. - - name: dropwhile - decision: wanted - note: Predicate-based slicing has a clean plain-value contract. - - name: filterfalse - decision: wanted - note: Predicate-based filtering has a clean plain-value contract. - name: islice decision: wanted note: Iterator slicing maps naturally onto array slicing semantics. @@ -190128,36 +190142,13 @@ languages: - name: product decision: wanted note: Cartesian products can be represented as arrays of tuples. - - name: starmap - decision: wanted - note: Spread-argument mapping still has a clean plain-value contract. - - name: takewhile - decision: wanted - note: Predicate-based slicing has a clean plain-value contract. - name: zip_longest decision: wanted note: Sequence zipping has a strong plain-value contract. - skippedEntries: - - name: count - decision: skip_runtime_model - note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. - - name: cycle - decision: skip_runtime_model - note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. - - name: groupby - decision: skip_runtime_model - note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. - - name: repeat - decision: skip_runtime_model - note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. - - name: tee - decision: skip_runtime_model - note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. - untriagedEntries: [] - staleDecisions: [] - categories: [] - catalogShippedCount: 0 - coveragePercent: 0 + categories: + - itertools + catalogShippedCount: 11 + coveragePercent: 55 - namespace: json title: json target: Python 3.12 diff --git a/website/source/python/_helpers/toIterableArray.html b/website/source/python/_helpers/toIterableArray.html new file mode 100644 index 0000000000..a8c0faeb03 --- /dev/null +++ b/website/source/python/_helpers/toIterableArray.html @@ -0,0 +1,772 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: [] +returns: [] +dependencies: + - python/_helpers/_operator +authors: {} +notes: [] +parityVerified: null +isTypescript: true +type: function +layout: function +title: Python's _helpers.toIterableArray in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + _helpers.toIterableArray looks like. +function: toIterableArray +category: _helpers +language: python +permalink: python/_helpers/toIterableArray/ +alias: + - /functions/python/toIterableArray/ + - /functions/_helpers/toIterableArray/ + - /python/toIterableArray/ +--- +
+{% codeblock lang:typescript %}import { pythonAdd, pythonTruth } from './_operator.ts' + +type IterableOptions = { + fillvalue?: unknown +} + +type RepeatOptions = { + repeat?: unknown +} + +export function toIterableArray(iterable: unknown, functionName: string): unknown[] { + if (Array.isArray(iterable)) { + return [...iterable] + } + + if (typeof iterable === 'string') { + return [...iterable] + } + + if (isIterable(iterable)) { + return Array.from(iterable) + } + + throw new TypeError(`${functionName}() expected an iterable`) +} + +export function parseZipLongestArgs(args: unknown[]): { iterables: unknown[]; fillvalue: unknown } { + if (args.length === 0) { + return { iterables: [], fillvalue: null } + } + + const options = extractIterableOptions(args[args.length - 1]) + if (!options) { + return { iterables: args, fillvalue: null } + } + + return { + iterables: args.slice(0, -1), + fillvalue: options.fillvalue ?? null, + } +} + +export function parseProductArgs(args: unknown[]): { iterables: unknown[]; repeat: number } { + if (args.length === 0) { + return { iterables: [], repeat: 1 } + } + + const options = extractRepeatOptions(args[args.length - 1]) + if (!options) { + return { iterables: args, repeat: 1 } + } + + return { + iterables: args.slice(0, -1), + repeat: toNonNegativeInteger(options.repeat ?? 1, 'product'), + } +} + +export function itertoolsAccumulate( + iterable: unknown, + func: ((accumulator: unknown, value: unknown) => unknown) | undefined, +): unknown[] { + const values = toIterableArray(iterable, 'accumulate') + if (values.length === 0) { + return [] + } + + const callback = func ?? defaultAccumulateStep + const result = [values[0]] + for (let index = 1; index < values.length; index += 1) { + result.push(callback(result[result.length - 1], values[index])) + } + return result +} + +export function itertoolsBatched(iterable: unknown, n: unknown): unknown[][] { + const values = toIterableArray(iterable, 'batched') + const batchSize = toPositiveInteger(n, 'batched', 'n must be at least one') + const result: unknown[][] = [] + + for (let index = 0; index < values.length; index += batchSize) { + result.push(values.slice(index, index + batchSize)) + } + + return result +} + +export function itertoolsChain(iterables: unknown[]): unknown[] { + return iterables.flatMap((iterable) => toIterableArray(iterable, 'chain')) +} + +export function itertoolsCompress(data: unknown, selectors: unknown): unknown[] { + const values = toIterableArray(data, 'compress') + const masks = toIterableArray(selectors, 'compress') + const result: unknown[] = [] + + for (let index = 0; index < values.length && index < masks.length; index += 1) { + if (pythonTruth(masks[index])) { + result.push(values[index]) + } + } + + return result +} + +export function itertoolsIslice(iterable: unknown, args: unknown[]): unknown[] { + const values = toIterableArray(iterable, 'islice') + const { start, stop, step } = parseSliceArgs(args) + const result: unknown[] = [] + + for (let index = start; index < stop && index < values.length; index += step) { + result.push(values[index]) + } + + return result +} + +export function itertoolsPairwise(iterable: unknown): unknown[][] { + const values = toIterableArray(iterable, 'pairwise') + const result: unknown[][] = [] + + for (let index = 0; index + 1 < values.length; index += 1) { + result.push([values[index], values[index + 1]]) + } + + return result +} + +export function itertoolsZipLongest(args: unknown[]): unknown[][] { + const { iterables, fillvalue } = parseZipLongestArgs(args) + const pools = iterables.map((iterable) => toIterableArray(iterable, 'zip_longest')) + const width = pools.reduce((max, pool) => Math.max(max, pool.length), 0) + const result: unknown[][] = [] + + for (let row = 0; row < width; row += 1) { + result.push(pools.map((pool) => (row < pool.length ? pool[row] : fillvalue))) + } + + return result +} + +export function itertoolsCombinations(iterable: unknown, r: unknown): unknown[][] { + const pool = toIterableArray(iterable, 'combinations') + const size = toNonNegativeInteger(r, 'combinations') + const result: unknown[][] = [] + + buildCombinations(pool, size, 0, [], result) + return result +} + +export function itertoolsCombinationsWithReplacement(iterable: unknown, r: unknown): unknown[][] { + const pool = toIterableArray(iterable, 'combinations_with_replacement') + const size = toNonNegativeInteger(r, 'combinations_with_replacement') + const result: unknown[][] = [] + + if (size === 0) { + return [[]] + } + if (pool.length === 0) { + return [] + } + + buildCombinationsWithReplacement(pool, size, 0, [], result) + return result +} + +export function itertoolsPermutations(iterable: unknown, r?: unknown): unknown[][] { + const pool = toIterableArray(iterable, 'permutations') + const size = r === undefined ? pool.length : toNonNegativeInteger(r, 'permutations') + const result: unknown[][] = [] + + if (size > pool.length) { + return [] + } + + buildPermutations(pool, size, [], new Set(), result) + return result +} + +export function itertoolsProduct(args: unknown[]): unknown[][] { + const { iterables, repeat } = parseProductArgs(args) + const basePools = iterables.map((iterable) => toIterableArray(iterable, 'product')) + const pools = + repeat === 1 + ? basePools + : Array.from({ length: repeat }, () => basePools).flatMap((poolSet) => poolSet.map((pool) => [...pool])) + + if (pools.length === 0) { + return [[]] + } + if (pools.some((pool) => pool.length === 0)) { + return [] + } + + const result: unknown[][] = [] + buildProduct(pools, 0, [], result) + return result +} + +function defaultAccumulateStep(left: unknown, right: unknown): unknown { + return pythonAdd(left, right, 'accumulate') +} + +function parseSliceArgs(args: unknown[]): { start: number; stop: number; step: number } { + if (args.length === 0) { + throw new TypeError("islice() missing required argument 'stop'") + } + if (args.length > 3) { + throw new TypeError(`islice expected at most 4 arguments, got ${args.length + 1}`) + } + + let start = 0 + let stop = 0 + let step = 1 + + if (args.length === 1) { + stop = toNonNegativeInteger(args[0], 'islice') + } else { + start = toNonNegativeInteger(args[0], 'islice') + stop = toNonNegativeInteger(args[1], 'islice') + if (args.length === 3) { + step = toPositiveInteger(args[2], 'islice', 'step for islice() must be a positive integer or None') + } + } + + return { start, stop, step } +} + +function buildCombinations( + pool: unknown[], + size: number, + start: number, + current: unknown[], + result: unknown[][], +): void { + if (current.length === size) { + result.push([...current]) + return + } + + for (let index = start; index <= pool.length - (size - current.length); index += 1) { + current.push(pool[index]) + buildCombinations(pool, size, index + 1, current, result) + current.pop() + } +} + +function buildCombinationsWithReplacement( + pool: unknown[], + size: number, + start: number, + current: unknown[], + result: unknown[][], +): void { + if (current.length === size) { + result.push([...current]) + return + } + + for (let index = start; index < pool.length; index += 1) { + current.push(pool[index]) + buildCombinationsWithReplacement(pool, size, index, current, result) + current.pop() + } +} + +function buildPermutations( + pool: unknown[], + size: number, + current: unknown[], + usedIndexes: Set, + result: unknown[][], +): void { + if (current.length === size) { + result.push([...current]) + return + } + + for (let index = 0; index < pool.length; index += 1) { + if (usedIndexes.has(index)) { + continue + } + usedIndexes.add(index) + current.push(pool[index]) + buildPermutations(pool, size, current, usedIndexes, result) + current.pop() + usedIndexes.delete(index) + } +} + +function buildProduct(pools: unknown[][], index: number, current: unknown[], result: unknown[][]): void { + if (index >= pools.length) { + result.push([...current]) + return + } + + const pool = pools[index] ?? [] + for (const value of pool) { + current.push(value) + buildProduct(pools, index + 1, current, result) + current.pop() + } +} + +function toPositiveInteger(value: unknown, functionName: string, message?: string): number { + const integer = toNonNegativeInteger(value, functionName) + if (integer < 1) { + throw new Error(message ?? `${functionName}() expected a positive integer`) + } + return integer +} + +function toNonNegativeInteger(value: unknown, functionName: string): number { + if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) { + throw new TypeError(`${functionName}() expected a non-negative integer`) + } + + return value +} + +function isIterable(value: unknown): value is Iterable { + return ( + (typeof value === 'object' || typeof value === 'function') && + value !== null && + Symbol.iterator in value && + typeof value[Symbol.iterator] === 'function' + ) +} + +function extractIterableOptions(value: unknown): IterableOptions | null { + if (!isPlainObject(value)) { + return null + } + + const keys = Object.keys(value) + if (keys.length === 0 || keys.some((key) => key !== 'fillvalue')) { + return null + } + + return value +} + +function extractRepeatOptions(value: unknown): RepeatOptions | null { + if (!isPlainObject(value)) { + return null + } + + const keys = Object.keys(value) + if (keys.length === 0 || keys.some((key) => key !== 'repeat')) { + return null + } + + return value +} + +function isPlainObject(value: unknown): value is { [key: string]: unknown } { + return typeof value === 'object' && value !== null && Object.getPrototypeOf(value) === Object.prototype +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/accumulate.html b/website/source/python/itertools/accumulate.html new file mode 100644 index 0000000000..bf27179d0a --- /dev/null +++ b/website/source/python/itertools/accumulate.html @@ -0,0 +1,258 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - accumulate([1, 2, 3, 4]) + - accumulate(['a', 'b', 'c']) +returns: + - '[1, 3, 6, 10]' + - '[''a'', ''ab'', ''abc'']' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: + - >- + Materializes Python's lazy iterator into a plain array of intermediate + values. +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.accumulate in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.accumulate looks like. +function: accumulate +category: itertools +language: python +permalink: python/itertools/accumulate/ +alias: + - /functions/python/accumulate/ + - /functions/itertools/accumulate/ + - /python/accumulate/ +--- +
+{% codeblock lang:typescript %}import { itertoolsAccumulate } from '../_helpers/_itertools.ts' + +export function accumulate(iterable: unknown, func?: (accumulator: unknown, value: unknown) => unknown): unknown[] { + // discuss at: https://locutus.io/python/itertools/accumulate/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // note 1: Materializes Python's lazy iterator into a plain array of intermediate values. + // example 1: accumulate([1, 2, 3, 4]) + // returns 1: [1, 3, 6, 10] + // example 2: accumulate(['a', 'b', 'c']) + // returns 2: ['a', 'ab', 'abc'] + + return itertoolsAccumulate(iterable, func) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/batched.html b/website/source/python/itertools/batched.html new file mode 100644 index 0000000000..0da5cdef21 --- /dev/null +++ b/website/source/python/itertools/batched.html @@ -0,0 +1,190 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - batched([1, 2, 3, 4, 5], 2) +returns: + - '[[1, 2], [3, 4], [5]]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.batched in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.batched looks like. +function: batched +category: itertools +language: python +permalink: python/itertools/batched/ +alias: + - /functions/python/batched/ + - /functions/itertools/batched/ + - /python/batched/ +--- +
+{% codeblock lang:typescript %}import { itertoolsBatched } from '../_helpers/_itertools.ts' + +export function batched(iterable: unknown, n: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/batched/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: batched([1, 2, 3, 4, 5], 2) + // returns 1: [[1, 2], [3, 4], [5]] + + return itertoolsBatched(iterable, n) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/chain.html b/website/source/python/itertools/chain.html new file mode 100644 index 0000000000..267446382b --- /dev/null +++ b/website/source/python/itertools/chain.html @@ -0,0 +1,142 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - chain([1, 2], [3, 4], [5]) +returns: + - '[1, 2, 3, 4, 5]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.chain in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.chain looks like. +function: chain +category: itertools +language: python +permalink: python/itertools/chain/ +alias: + - /functions/python/chain/ + - /functions/itertools/chain/ + - /python/chain/ +--- +
+{% codeblock lang:typescript %}import { itertoolsChain } from '../_helpers/_itertools.ts' + +export function chain(...iterables: unknown[]): unknown[] { + // discuss at: https://locutus.io/python/itertools/chain/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: chain([1, 2], [3, 4], [5]) + // returns 1: [1, 2, 3, 4, 5] + + return itertoolsChain(iterables) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/combinations.html b/website/source/python/itertools/combinations.html new file mode 100644 index 0000000000..ffb7800a48 --- /dev/null +++ b/website/source/python/itertools/combinations.html @@ -0,0 +1,200 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - combinations(['A', 'B', 'C'], 2) +returns: + - '[[''A'', ''B''], [''A'', ''C''], [''B'', ''C'']]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.combinations in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.combinations looks like. +function: combinations +category: itertools +language: python +permalink: python/itertools/combinations/ +alias: + - /functions/python/combinations/ + - /functions/itertools/combinations/ + - /python/combinations/ +--- +
+{% codeblock lang:typescript %}import { itertoolsCombinations } from '../_helpers/_itertools.ts' + +export function combinations(iterable: unknown, r: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/combinations/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: combinations(['A', 'B', 'C'], 2) + // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'C']] + + return itertoolsCombinations(iterable, r) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/combinations_with_replacement.html b/website/source/python/itertools/combinations_with_replacement.html new file mode 100644 index 0000000000..887b46c7e3 --- /dev/null +++ b/website/source/python/itertools/combinations_with_replacement.html @@ -0,0 +1,214 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - combinations_with_replacement(['A', 'B', 'C'], 2) +returns: + - '[[''A'', ''A''], [''A'', ''B''], [''A'', ''C''], [''B'', ''B''], [''B'', ''C''], [''C'', ''C'']]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.combinations_with_replacement in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.combinations_with_replacement looks like. +function: combinations_with_replacement +category: itertools +language: python +permalink: python/itertools/combinations_with_replacement/ +alias: + - /functions/python/combinations_with_replacement/ + - /functions/itertools/combinations_with_replacement/ + - /python/combinations_with_replacement/ +--- +
+{% codeblock lang:typescript %}import { itertoolsCombinationsWithReplacement } from '../_helpers/_itertools.ts' + +export function combinations_with_replacement(iterable: unknown, r: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/combinations_with_replacement/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: combinations_with_replacement(['A', 'B', 'C'], 2) + // returns 1: [['A', 'A'], ['A', 'B'], ['A', 'C'], ['B', 'B'], ['B', 'C'], ['C', 'C']] + + return itertoolsCombinationsWithReplacement(iterable, r) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/compress.html b/website/source/python/itertools/compress.html new file mode 100644 index 0000000000..c763b60036 --- /dev/null +++ b/website/source/python/itertools/compress.html @@ -0,0 +1,254 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - compress(['A', 'B', 'C', 'D'], [1, 0, 1, 0]) +returns: + - '[''A'', ''C'']' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.compress in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.compress looks like. +function: compress +category: itertools +language: python +permalink: python/itertools/compress/ +alias: + - /functions/python/compress/ + - /functions/itertools/compress/ + - /python/compress/ +--- +
+{% codeblock lang:typescript %}import { itertoolsCompress } from '../_helpers/_itertools.ts' + +export function compress(data: unknown, selectors: unknown): unknown[] { + // discuss at: https://locutus.io/python/itertools/compress/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: compress(['A', 'B', 'C', 'D'], [1, 0, 1, 0]) + // returns 1: ['A', 'C'] + + return itertoolsCompress(data, selectors) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/index.html b/website/source/python/itertools/index.html new file mode 100644 index 0000000000..765d67bdbb --- /dev/null +++ b/website/source/python/itertools/index.html @@ -0,0 +1,8 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +type: category +layout: category +language: python +category: itertools +title: Python's itertools module in TypeScript +--- diff --git a/website/source/python/itertools/islice.html b/website/source/python/itertools/islice.html new file mode 100644 index 0000000000..bbd24bd858 --- /dev/null +++ b/website/source/python/itertools/islice.html @@ -0,0 +1,250 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - islice([0, 1, 2, 3, 4, 5], 1, 6, 2) + - islice([0, 1, 2, 3, 4, 5], 4) +returns: + - '[1, 3, 5]' + - '[0, 1, 2, 3]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.islice in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.islice looks like. +function: islice +category: itertools +language: python +permalink: python/itertools/islice/ +alias: + - /functions/python/islice/ + - /functions/itertools/islice/ + - /python/islice/ +--- +
+{% codeblock lang:typescript %}import { itertoolsIslice } from '../_helpers/_itertools.ts' + +export function islice(iterable: unknown, ...args: unknown[]): unknown[] { + // discuss at: https://locutus.io/python/itertools/islice/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: islice([0, 1, 2, 3, 4, 5], 1, 6, 2) + // returns 1: [1, 3, 5] + // example 2: islice([0, 1, 2, 3, 4, 5], 4) + // returns 2: [0, 1, 2, 3] + + return itertoolsIslice(iterable, args) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/pairwise.html b/website/source/python/itertools/pairwise.html new file mode 100644 index 0000000000..b5b873fb33 --- /dev/null +++ b/website/source/python/itertools/pairwise.html @@ -0,0 +1,156 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - pairwise([1, 2, 3, 4]) +returns: + - '[[1, 2], [2, 3], [3, 4]]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.pairwise in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.pairwise looks like. +function: pairwise +category: itertools +language: python +permalink: python/itertools/pairwise/ +alias: + - /functions/python/pairwise/ + - /functions/itertools/pairwise/ + - /python/pairwise/ +--- +
+{% codeblock lang:typescript %}import { itertoolsPairwise } from '../_helpers/_itertools.ts' + +export function pairwise(iterable: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/pairwise/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: pairwise([1, 2, 3, 4]) + // returns 1: [[1, 2], [2, 3], [3, 4]] + + return itertoolsPairwise(iterable) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/permutations.html b/website/source/python/itertools/permutations.html new file mode 100644 index 0000000000..f2d66595da --- /dev/null +++ b/website/source/python/itertools/permutations.html @@ -0,0 +1,218 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - permutations(['A', 'B', 'C'], 2) +returns: + - '[[''A'', ''B''], [''A'', ''C''], [''B'', ''A''], [''B'', ''C''], [''C'', ''A''], [''C'', ''B'']]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.permutations in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.permutations looks like. +function: permutations +category: itertools +language: python +permalink: python/itertools/permutations/ +alias: + - /functions/python/permutations/ + - /functions/itertools/permutations/ + - /python/permutations/ +--- +
+{% codeblock lang:typescript %}import { itertoolsPermutations } from '../_helpers/_itertools.ts' + +export function permutations(iterable: unknown, r?: unknown): unknown[][] { + // discuss at: https://locutus.io/python/itertools/permutations/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: permutations(['A', 'B', 'C'], 2) + // returns 1: [['A', 'B'], ['A', 'C'], ['B', 'A'], ['B', 'C'], ['C', 'A'], ['C', 'B']] + + return itertoolsPermutations(iterable, r) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/product.html b/website/source/python/itertools/product.html new file mode 100644 index 0000000000..bfe4402e31 --- /dev/null +++ b/website/source/python/itertools/product.html @@ -0,0 +1,288 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - product([1, 2], ['A', 'B']) +returns: + - '[[1, ''A''], [1, ''B''], [2, ''A''], [2, ''B'']]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.product in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.product looks like. +function: product +category: itertools +language: python +permalink: python/itertools/product/ +alias: + - /functions/python/product/ + - /functions/itertools/product/ + - /python/product/ +--- +
+{% codeblock lang:typescript %}import { itertoolsProduct } from '../_helpers/_itertools.ts' + +export function product(...args: unknown[]): unknown[][] { + // discuss at: https://locutus.io/python/itertools/product/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: product([1, 2], ['A', 'B']) + // returns 1: [[1, 'A'], [1, 'B'], [2, 'A'], [2, 'B']] + + return itertoolsProduct(args) +} +{% endcodeblock %} +
+ + + \ No newline at end of file diff --git a/website/source/python/itertools/zip_longest.html b/website/source/python/itertools/zip_longest.html new file mode 100644 index 0000000000..99ecf6e8f6 --- /dev/null +++ b/website/source/python/itertools/zip_longest.html @@ -0,0 +1,230 @@ +--- +warning: This file is auto generated by `yarn web:inject`, do not edit by hand +examples: + - zip_longest([1, 2, 3], ['A', 'B']) +returns: + - '[[1, ''A''], [2, ''B''], [3, null]]' +dependencies: + - python/_helpers/_itertools +authors: + original by: + - Kevin van Zonneveld (https://kvz.io) +notes: [] +parityVerified: + - Python 3.12 +isTypescript: true +type: function +layout: function +title: Python's itertools.zip_longest in TypeScript +description: >- + Here's what our current TypeScript equivalent to Python's + itertools.zip_longest looks like. +function: zip_longest +category: itertools +language: python +permalink: python/itertools/zip_longest/ +alias: + - /functions/python/zip_longest/ + - /functions/itertools/zip_longest/ + - /python/zip_longest/ +--- +
+{% codeblock lang:typescript %}import { itertoolsZipLongest } from '../_helpers/_itertools.ts' + +export function zip_longest(...args: unknown[]): unknown[][] { + // discuss at: https://locutus.io/python/itertools/zip_longest/ + // parity verified: Python 3.12 + // original by: Kevin van Zonneveld (https://kvz.io) + // example 1: zip_longest([1, 2, 3], ['A', 'B']) + // returns 1: [[1, 'A'], [2, 'B'], [3, null]] + + return itertoolsZipLongest(args) +} +{% endcodeblock %} +
+ + + \ No newline at end of file From e694ff53d6bf5910eadb521afe9f6cd045d66789 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:29:47 +0100 Subject: [PATCH 2/3] docs: clear stale python itertools wishlist entries --- docs/upstream-surface-inventory.yml | 33 ----------------------------- 1 file changed, 33 deletions(-) diff --git a/docs/upstream-surface-inventory.yml b/docs/upstream-surface-inventory.yml index d344ab73d4..c5ae60d17c 100644 --- a/docs/upstream-surface-inventory.yml +++ b/docs/upstream-surface-inventory.yml @@ -1500,51 +1500,18 @@ python: decision: skip_runtime_model note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. decisions: - accumulate: - decision: wanted - note: Accumulation over plain iterables can be represented as arrays of intermediate results. - batched: - decision: wanted - note: Fixed-size chunking is a strong plain-value portability target. - chain: - decision: wanted - note: Sequence concatenation maps naturally onto arrays. - combinations: - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - combinations_with_replacement: - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - compress: - decision: wanted - note: Mask-based filtering has a clean plain-value contract. dropwhile: decision: wanted note: Predicate-based slicing has a clean plain-value contract. filterfalse: decision: wanted note: Predicate-based filtering has a clean plain-value contract. - islice: - decision: wanted - note: Iterator slicing maps naturally onto array slicing semantics. - pairwise: - decision: wanted - note: Adjacent-pair grouping can be represented as arrays of tuples. - permutations: - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - product: - decision: wanted - note: Cartesian products can be represented as arrays of tuples. starmap: decision: wanted note: Spread-argument mapping still has a clean plain-value contract. takewhile: decision: wanted note: Predicate-based slicing has a clean plain-value contract. - zip_longest: - decision: wanted - note: Sequence zipping has a strong plain-value contract. math: title: math module default: From a8224423a9d89577c30379d64ae4cd52e162143c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 15:18:05 +0100 Subject: [PATCH 3/3] fix: skip helper pages in injectweb --- src/_util/util.ts | 4 + test/util/test-util.ts | 14 + website/source/_data/upstream_surface.yml | 37 +- .../_data/upstream_surface_inventory.yml | 33 - .../python/_helpers/toIterableArray.html | 772 ------------------ 5 files changed, 20 insertions(+), 840 deletions(-) delete mode 100644 website/source/python/_helpers/toIterableArray.html diff --git a/src/_util/util.ts b/src/_util/util.ts index ad58956582..37585b13d5 100644 --- a/src/_util/util.ts +++ b/src/_util/util.ts @@ -549,6 +549,10 @@ class Util { } async _injectwebOne(params: ParsedParams): Promise { + if (params.category === '_helpers') { + return + } + const authors: Record = {} this.authorKeys.forEach((key) => { if (params.headKeys[key]) { diff --git a/test/util/test-util.ts b/test/util/test-util.ts index befc844421..dcab72c62e 100644 --- a/test/util/test-util.ts +++ b/test/util/test-util.ts @@ -61,6 +61,20 @@ describe('util', function () { expect(() => util._verifyInjectwebPaths()).toThrow(/case-insensitive path collision/) }) + + it('should skip publishing helper pages', async function () { + const util = new Util() + const params = await util._load('python/_helpers/_calendar.ts', {}) + expect(params).not.toBeNull() + if (!params) { + return + } + + util._injectwebBuffer = {} + await util._injectwebOne(params) + + expect(util._injectwebBuffer).toEqual({}) + }) }) describe('_extractDependencies', function () { diff --git a/website/source/_data/upstream_surface.yml b/website/source/_data/upstream_surface.yml index 0dda31567f..3ceff1e1f0 100644 --- a/website/source/_data/upstream_surface.yml +++ b/website/source/_data/upstream_surface.yml @@ -1,4 +1,4 @@ -generatedAt: '2026-03-27T13:05:54.290Z' +generatedAt: '2026-03-27T13:29:34.753Z' languages: awk: language: awk @@ -190111,40 +190111,7 @@ languages: decision: skip_runtime_model note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. untriagedEntries: [] - staleDecisions: - - name: accumulate - decision: wanted - note: Accumulation over plain iterables can be represented as arrays of intermediate results. - - name: batched - decision: wanted - note: Fixed-size chunking is a strong plain-value portability target. - - name: chain - decision: wanted - note: Sequence concatenation maps naturally onto arrays. - - name: combinations - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - - name: combinations_with_replacement - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - - name: compress - decision: wanted - note: Mask-based filtering has a clean plain-value contract. - - name: islice - decision: wanted - note: Iterator slicing maps naturally onto array slicing semantics. - - name: pairwise - decision: wanted - note: Adjacent-pair grouping can be represented as arrays of tuples. - - name: permutations - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - - name: product - decision: wanted - note: Cartesian products can be represented as arrays of tuples. - - name: zip_longest - decision: wanted - note: Sequence zipping has a strong plain-value contract. + staleDecisions: [] categories: - itertools catalogShippedCount: 11 diff --git a/website/source/_data/upstream_surface_inventory.yml b/website/source/_data/upstream_surface_inventory.yml index d344ab73d4..c5ae60d17c 100644 --- a/website/source/_data/upstream_surface_inventory.yml +++ b/website/source/_data/upstream_surface_inventory.yml @@ -1500,51 +1500,18 @@ python: decision: skip_runtime_model note: Many itertools helpers are lazy or stateful iterator factories rather than direct plain values. decisions: - accumulate: - decision: wanted - note: Accumulation over plain iterables can be represented as arrays of intermediate results. - batched: - decision: wanted - note: Fixed-size chunking is a strong plain-value portability target. - chain: - decision: wanted - note: Sequence concatenation maps naturally onto arrays. - combinations: - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - combinations_with_replacement: - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - compress: - decision: wanted - note: Mask-based filtering has a clean plain-value contract. dropwhile: decision: wanted note: Predicate-based slicing has a clean plain-value contract. filterfalse: decision: wanted note: Predicate-based filtering has a clean plain-value contract. - islice: - decision: wanted - note: Iterator slicing maps naturally onto array slicing semantics. - pairwise: - decision: wanted - note: Adjacent-pair grouping can be represented as arrays of tuples. - permutations: - decision: wanted - note: Finite combinatorics helpers can be represented as arrays of tuples. - product: - decision: wanted - note: Cartesian products can be represented as arrays of tuples. starmap: decision: wanted note: Spread-argument mapping still has a clean plain-value contract. takewhile: decision: wanted note: Predicate-based slicing has a clean plain-value contract. - zip_longest: - decision: wanted - note: Sequence zipping has a strong plain-value contract. math: title: math module default: diff --git a/website/source/python/_helpers/toIterableArray.html b/website/source/python/_helpers/toIterableArray.html deleted file mode 100644 index a8c0faeb03..0000000000 --- a/website/source/python/_helpers/toIterableArray.html +++ /dev/null @@ -1,772 +0,0 @@ ---- -warning: This file is auto generated by `yarn web:inject`, do not edit by hand -examples: [] -returns: [] -dependencies: - - python/_helpers/_operator -authors: {} -notes: [] -parityVerified: null -isTypescript: true -type: function -layout: function -title: Python's _helpers.toIterableArray in TypeScript -description: >- - Here's what our current TypeScript equivalent to Python's - _helpers.toIterableArray looks like. -function: toIterableArray -category: _helpers -language: python -permalink: python/_helpers/toIterableArray/ -alias: - - /functions/python/toIterableArray/ - - /functions/_helpers/toIterableArray/ - - /python/toIterableArray/ ---- -
-{% codeblock lang:typescript %}import { pythonAdd, pythonTruth } from './_operator.ts' - -type IterableOptions = { - fillvalue?: unknown -} - -type RepeatOptions = { - repeat?: unknown -} - -export function toIterableArray(iterable: unknown, functionName: string): unknown[] { - if (Array.isArray(iterable)) { - return [...iterable] - } - - if (typeof iterable === 'string') { - return [...iterable] - } - - if (isIterable(iterable)) { - return Array.from(iterable) - } - - throw new TypeError(`${functionName}() expected an iterable`) -} - -export function parseZipLongestArgs(args: unknown[]): { iterables: unknown[]; fillvalue: unknown } { - if (args.length === 0) { - return { iterables: [], fillvalue: null } - } - - const options = extractIterableOptions(args[args.length - 1]) - if (!options) { - return { iterables: args, fillvalue: null } - } - - return { - iterables: args.slice(0, -1), - fillvalue: options.fillvalue ?? null, - } -} - -export function parseProductArgs(args: unknown[]): { iterables: unknown[]; repeat: number } { - if (args.length === 0) { - return { iterables: [], repeat: 1 } - } - - const options = extractRepeatOptions(args[args.length - 1]) - if (!options) { - return { iterables: args, repeat: 1 } - } - - return { - iterables: args.slice(0, -1), - repeat: toNonNegativeInteger(options.repeat ?? 1, 'product'), - } -} - -export function itertoolsAccumulate( - iterable: unknown, - func: ((accumulator: unknown, value: unknown) => unknown) | undefined, -): unknown[] { - const values = toIterableArray(iterable, 'accumulate') - if (values.length === 0) { - return [] - } - - const callback = func ?? defaultAccumulateStep - const result = [values[0]] - for (let index = 1; index < values.length; index += 1) { - result.push(callback(result[result.length - 1], values[index])) - } - return result -} - -export function itertoolsBatched(iterable: unknown, n: unknown): unknown[][] { - const values = toIterableArray(iterable, 'batched') - const batchSize = toPositiveInteger(n, 'batched', 'n must be at least one') - const result: unknown[][] = [] - - for (let index = 0; index < values.length; index += batchSize) { - result.push(values.slice(index, index + batchSize)) - } - - return result -} - -export function itertoolsChain(iterables: unknown[]): unknown[] { - return iterables.flatMap((iterable) => toIterableArray(iterable, 'chain')) -} - -export function itertoolsCompress(data: unknown, selectors: unknown): unknown[] { - const values = toIterableArray(data, 'compress') - const masks = toIterableArray(selectors, 'compress') - const result: unknown[] = [] - - for (let index = 0; index < values.length && index < masks.length; index += 1) { - if (pythonTruth(masks[index])) { - result.push(values[index]) - } - } - - return result -} - -export function itertoolsIslice(iterable: unknown, args: unknown[]): unknown[] { - const values = toIterableArray(iterable, 'islice') - const { start, stop, step } = parseSliceArgs(args) - const result: unknown[] = [] - - for (let index = start; index < stop && index < values.length; index += step) { - result.push(values[index]) - } - - return result -} - -export function itertoolsPairwise(iterable: unknown): unknown[][] { - const values = toIterableArray(iterable, 'pairwise') - const result: unknown[][] = [] - - for (let index = 0; index + 1 < values.length; index += 1) { - result.push([values[index], values[index + 1]]) - } - - return result -} - -export function itertoolsZipLongest(args: unknown[]): unknown[][] { - const { iterables, fillvalue } = parseZipLongestArgs(args) - const pools = iterables.map((iterable) => toIterableArray(iterable, 'zip_longest')) - const width = pools.reduce((max, pool) => Math.max(max, pool.length), 0) - const result: unknown[][] = [] - - for (let row = 0; row < width; row += 1) { - result.push(pools.map((pool) => (row < pool.length ? pool[row] : fillvalue))) - } - - return result -} - -export function itertoolsCombinations(iterable: unknown, r: unknown): unknown[][] { - const pool = toIterableArray(iterable, 'combinations') - const size = toNonNegativeInteger(r, 'combinations') - const result: unknown[][] = [] - - buildCombinations(pool, size, 0, [], result) - return result -} - -export function itertoolsCombinationsWithReplacement(iterable: unknown, r: unknown): unknown[][] { - const pool = toIterableArray(iterable, 'combinations_with_replacement') - const size = toNonNegativeInteger(r, 'combinations_with_replacement') - const result: unknown[][] = [] - - if (size === 0) { - return [[]] - } - if (pool.length === 0) { - return [] - } - - buildCombinationsWithReplacement(pool, size, 0, [], result) - return result -} - -export function itertoolsPermutations(iterable: unknown, r?: unknown): unknown[][] { - const pool = toIterableArray(iterable, 'permutations') - const size = r === undefined ? pool.length : toNonNegativeInteger(r, 'permutations') - const result: unknown[][] = [] - - if (size > pool.length) { - return [] - } - - buildPermutations(pool, size, [], new Set(), result) - return result -} - -export function itertoolsProduct(args: unknown[]): unknown[][] { - const { iterables, repeat } = parseProductArgs(args) - const basePools = iterables.map((iterable) => toIterableArray(iterable, 'product')) - const pools = - repeat === 1 - ? basePools - : Array.from({ length: repeat }, () => basePools).flatMap((poolSet) => poolSet.map((pool) => [...pool])) - - if (pools.length === 0) { - return [[]] - } - if (pools.some((pool) => pool.length === 0)) { - return [] - } - - const result: unknown[][] = [] - buildProduct(pools, 0, [], result) - return result -} - -function defaultAccumulateStep(left: unknown, right: unknown): unknown { - return pythonAdd(left, right, 'accumulate') -} - -function parseSliceArgs(args: unknown[]): { start: number; stop: number; step: number } { - if (args.length === 0) { - throw new TypeError("islice() missing required argument 'stop'") - } - if (args.length > 3) { - throw new TypeError(`islice expected at most 4 arguments, got ${args.length + 1}`) - } - - let start = 0 - let stop = 0 - let step = 1 - - if (args.length === 1) { - stop = toNonNegativeInteger(args[0], 'islice') - } else { - start = toNonNegativeInteger(args[0], 'islice') - stop = toNonNegativeInteger(args[1], 'islice') - if (args.length === 3) { - step = toPositiveInteger(args[2], 'islice', 'step for islice() must be a positive integer or None') - } - } - - return { start, stop, step } -} - -function buildCombinations( - pool: unknown[], - size: number, - start: number, - current: unknown[], - result: unknown[][], -): void { - if (current.length === size) { - result.push([...current]) - return - } - - for (let index = start; index <= pool.length - (size - current.length); index += 1) { - current.push(pool[index]) - buildCombinations(pool, size, index + 1, current, result) - current.pop() - } -} - -function buildCombinationsWithReplacement( - pool: unknown[], - size: number, - start: number, - current: unknown[], - result: unknown[][], -): void { - if (current.length === size) { - result.push([...current]) - return - } - - for (let index = start; index < pool.length; index += 1) { - current.push(pool[index]) - buildCombinationsWithReplacement(pool, size, index, current, result) - current.pop() - } -} - -function buildPermutations( - pool: unknown[], - size: number, - current: unknown[], - usedIndexes: Set, - result: unknown[][], -): void { - if (current.length === size) { - result.push([...current]) - return - } - - for (let index = 0; index < pool.length; index += 1) { - if (usedIndexes.has(index)) { - continue - } - usedIndexes.add(index) - current.push(pool[index]) - buildPermutations(pool, size, current, usedIndexes, result) - current.pop() - usedIndexes.delete(index) - } -} - -function buildProduct(pools: unknown[][], index: number, current: unknown[], result: unknown[][]): void { - if (index >= pools.length) { - result.push([...current]) - return - } - - const pool = pools[index] ?? [] - for (const value of pool) { - current.push(value) - buildProduct(pools, index + 1, current, result) - current.pop() - } -} - -function toPositiveInteger(value: unknown, functionName: string, message?: string): number { - const integer = toNonNegativeInteger(value, functionName) - if (integer < 1) { - throw new Error(message ?? `${functionName}() expected a positive integer`) - } - return integer -} - -function toNonNegativeInteger(value: unknown, functionName: string): number { - if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) { - throw new TypeError(`${functionName}() expected a non-negative integer`) - } - - return value -} - -function isIterable(value: unknown): value is Iterable { - return ( - (typeof value === 'object' || typeof value === 'function') && - value !== null && - Symbol.iterator in value && - typeof value[Symbol.iterator] === 'function' - ) -} - -function extractIterableOptions(value: unknown): IterableOptions | null { - if (!isPlainObject(value)) { - return null - } - - const keys = Object.keys(value) - if (keys.length === 0 || keys.some((key) => key !== 'fillvalue')) { - return null - } - - return value -} - -function extractRepeatOptions(value: unknown): RepeatOptions | null { - if (!isPlainObject(value)) { - return null - } - - const keys = Object.keys(value) - if (keys.length === 0 || keys.some((key) => key !== 'repeat')) { - return null - } - - return value -} - -function isPlainObject(value: unknown): value is { [key: string]: unknown } { - return typeof value === 'object' && value !== null && Object.getPrototypeOf(value) === Object.prototype -} -{% endcodeblock %} -
- - - \ No newline at end of file