@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
31 lines (28 loc) • 710 B
text/typescript
import inquirer from "inquirer";
export interface PrecalcAnswers {
precalc: boolean;
}
export async function precalcQuestion(
questionText?: string,
): Promise<Pick<PrecalcAnswers, "precalc">> {
return inquirer.prompt<Pick<PrecalcAnswers, "precalc">>([
{
type: "list",
name: "precalc",
message: questionText
? questionText
: "Will you be precalculating summary metrics for this datasource after import? (Typically yes if reporting sketch % overlap with datasource)",
default: "yes",
choices: [
{
value: true,
name: "Yes",
},
{
value: false,
name: "No",
},
],
},
]);
}