Skip to content

Commit 6d17d91

Browse files
refactor(gp): update type usage
1 parent 28c96bb commit 6d17d91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/gp/src/ast.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { Maybe } from "@thi.ng/api";
12
import { assert } from "@thi.ng/errors/assert";
23
import { SYSTEM } from "@thi.ng/random/system";
34
import { iterate } from "@thi.ng/transducers/iterate";
@@ -70,7 +71,7 @@ export class AST<OP, T> {
7071
let loc = this.asZipper(tree).next!;
7172
if (!loc) return tree;
7273
while (true) {
73-
let nextLoc: Location<ASTNode<OP, T>> | undefined;
74+
let nextLoc: Maybe<Location<ASTNode<OP, T>>>;
7475
if (rnd!.probability(probMutate)) {
7576
loc = loc.replace(
7677
this.randomASTNode(0, Math.min(limit - loc.depth, maxDepth))

0 commit comments

Comments
 (0)