Polyman Documentation - v2.2.2
    Preparing search index...

    Function ensureMainSolutionExists

    • Ensures a main-correct solution exists in the configuration. Type assertion function that throws if no MA (main correct) solution found.

      Parameters

      • solutions: LocalSolution[] | undefined

        Solutions array to validate

      Returns asserts solutions is LocalSolution[]

      If no solutions are defined

      If no MA (main correct) solution exists

      const config = readConfigFile();
      ensureMainSolutionExists(config.solutions);