just-intersect
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -9,2 +9,3 @@ /** | ||
*/ | ||
export default function intersect<T, U, I extends T | U>(arr1: T[], arr2: U[]): I[] | ||
export default function intersect<T, U, I extends T | U>(arr1: T[], arr2: U[]): I[]; | ||
export default function intersect<T, U, I extends T | U>(arr1: readonly T[], arr2: readonly U[]): I[]; |
@@ -9,2 +9,4 @@ import intersect from './index'; | ||
const test5: unknown[] = intersect([1, 2, 3], ["a", "b", "c"]) | ||
// check readonly types | ||
const test6: (1 | 2)[] = intersect([1, 2, 3] as const, [4, 5, 1, 2] as const) | ||
@@ -11,0 +13,0 @@ // Not OK |
{ | ||
"name": "just-intersect", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "return the intersect of two arrays", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4307
70