Skip to content

Commit e1b7fd1

Browse files
committed
chore: bump version to 0.1.0-alpha.6 and update OptionalGenerator return type
1 parent 193847e commit e1b7fd1

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/deepcover/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deepcover",
3-
"version": "0.1.0-alpha.5",
3+
"version": "0.1.0-alpha.6",
44
"description": "",
55
"type": "module",
66
"scripts": {

packages/deepcover/src/permutation/modifiers/optional.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import type {
22
PermutationGenerator,
3+
UnwrapPermutation,
34
UnwrapPermutationGenerator,
45
} from '#src/permutation/definitions';
56
import { merge } from '#src/permutation/utils';
7+
import type { CastAsPermutationGenerator } from '#src/utils/casting';
8+
9+
type UnwrapValue<T> = UnwrapPermutation<UnwrapPermutationGenerator<CastAsPermutationGenerator<T>>>;
610

711
export type OptionalGenerator<out T extends PermutationGenerator = PermutationGenerator> =
8-
() => Iterable<UnwrapPermutationGenerator<T>>;
12+
() => Iterable<UnwrapValue<T>>;
913

1014
export type OptionalPatch<T extends PermutationGenerator = PermutationGenerator> = {
1115
readonly size: T['size'];

0 commit comments

Comments
 (0)