Member Junction
    Preparing search index...
    • Parses and validates a matrix file against a decision's matrix schema. Throws naming the problem, and names a repeated cell label. Shared by the routing and discovery matrices.

      Type Parameters

      • TMatrix extends { cells: readonly { label: string }[] }

      Parameters

      • text: string

        The file's text.

      • source: string

        The file's name, for messages.

      • schema: {
            safeParse(
                value: unknown,
            ): { data: TMatrix; success: true } | { error: ZodError; success: false };
        }

        The decision's matrix schema.

      Returns TMatrix