Combine native shipment and ground movement promises
This commit is contained in:
1 parent
13398aa76e
commit
d4e82c74b1
26 files changed
+2341
-10
No files matched your search
@@ -19,6 +19,7 @@ export type MixedActionConfig<A> = {
|
||||
maxDepth: number;
|
||||
maxNodes?: number;
|
||||
maxTerms?: number;
|
||||
requireFact?: boolean;
|
||||
newAction: () => A;
|
||||
parseAction: (value: unknown, game: GameView, target: string) => A;
|
||||
renderAction: (props: { value: A; id: string; game: GameView; target: string;
|
||||
@@ -57,7 +58,8 @@ export function mixedActionInputError<A>(value: unknown, game: GameView, target:
|
||||
return fact;
|
||||
}, input => config.parseAction(input, game, target), { maxDepth: config.maxDepth, maxLeaves: config.maxLeaves,
|
||||
...(config.maxNodes === undefined ? {} : { maxNodes: config.maxNodes }),
|
||||
...(config.maxTerms === undefined ? {} : { maxTerms: config.maxTerms }) });
|
||||
...(config.maxTerms === undefined ? {} : { maxTerms: config.maxTerms }),
|
||||
...(config.requireFact === undefined ? {} : { requireFact: config.requireFact }) });
|
||||
return null;
|
||||
} catch (error) {
|
||||
return error instanceof Error ? error.message : config.fallbackError;
|
||||
|
||||
Reference in new issue
Block a user