HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/node_modules/just-zip-it/index.tests.ts
import zip from './index';

// OK
var a: any[][] = zip()

var b: [number][] = zip(
  [1, 2, 3]
)

var v: [number, string][] = zip(
  [1, 2, 3],
  ['a', 'b', 'c']
)

var w: [number, string][] = zip(
	[1, 2, 3] as const,
	['a', 'b', 'c'] as const
)

var x: any[] = zip(
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
  [1, 2, 3] as const,
)

// OK but throws
zip()

// Not OK
// @ts-expect-error
zip(undefined)
// @ts-expect-error
zip(null)
// @ts-expect-error
zip({ a: true, b: false })