just-permutations
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -1,2 +0,1 @@ | ||
export default function permutations<First, Rest>(arr: [First, ...Rest[]]): (First | Rest)[][]; | ||
export default function permutations<T>(arr: T[]): T[]; // for empty arrays | ||
export default function permutations<T>(arr: T[]): T[][]; // for empty arrays |
@@ -10,3 +10,3 @@ import permutations from './index'; | ||
const numbers: number[] = [] | ||
let test5: number[] = permutations(numbers) | ||
let test5: number[][] = permutations(numbers) | ||
@@ -29,2 +29,2 @@ // Not OK | ||
// @ts-expect-error | ||
permutations([], []); | ||
permutations([], []); |
{ | ||
"name": "just-permutations", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Returns all permutations of the length N of the elements of the given Array", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
56
3677