@koine/utils 2.0.0-beta.160 → 2.0.0-beta.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrayOfAll.d.ts +2 -2
- package/package.json +1 -1
package/arrayOfAll.d.ts
CHANGED
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
* const allFruits = arrayOfAllFruits([ "pear", "apple" ]); // ts compiler fails
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export declare let arrayOfAll: <T>() => <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : "Invalid")) => U & ([T] extends [U[number]] ? unknown : "Invalid");
|
|
17
|
+
export declare let arrayOfAll: <T>() => <U extends T[] | readonly T[]>(array: U & ([T] extends [U[number]] ? unknown : "Invalid")) => U & ([T] extends [U[number]] ? unknown : "Invalid");
|
|
18
18
|
/**
|
|
19
19
|
* @usage
|
|
20
20
|
* ```ts
|
|
21
21
|
* type Check_AreAllListed = AssertTrue<ArrayOfAll<typeof myList, MyUnion>>;
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export type ArrayOfAll<List extends unknown[], Union> = List[number] extends Union ? Union extends List[number] ? true : "Incomplete" : "Incomplete";
|
|
24
|
+
export type ArrayOfAll<List extends unknown[] | readonly unknown[], Union> = List[number] extends Union ? Union extends List[number] ? true : "Incomplete" : "Incomplete";
|
|
25
25
|
export default arrayOfAll;
|
package/package.json
CHANGED