From 293d7aa1aff8697158225e46b48b941c72571576 Mon Sep 17 00:00:00 2001 From: Guillaume Lagorce Date: Wed, 6 Nov 2024 09:46:14 +0100 Subject: [PATCH] chore: add some jsdoc to explicit types --- .../domain/models/CertificationAssessmentHistory.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/src/certification/scoring/domain/models/CertificationAssessmentHistory.js b/api/src/certification/scoring/domain/models/CertificationAssessmentHistory.js index 92620bb8469..776457cf727 100644 --- a/api/src/certification/scoring/domain/models/CertificationAssessmentHistory.js +++ b/api/src/certification/scoring/domain/models/CertificationAssessmentHistory.js @@ -1,10 +1,20 @@ +/** + * @typedef {import('../../../flash-certification/domain/models/FlashAssessmentAlgorithm.js').FlashAssessmentAlgorithm} FlashAssessmentAlgorithm + * @typedef {import('./CertificationChallengeForScoring.js').CertificationChallengeForScoring} CertificationChallengeForScoring + * @typedef {import('../../../../evaluation/domain/models/Answer.js').Answer} Answer + */ import { CertificationChallengeCapacity } from './CertificationChallengeCapacity.js'; export class CertificationAssessmentHistory { constructor({ capacityHistory }) { this.capacityHistory = capacityHistory; } - // WARN: challenges are not Array but Array + /** + * @param {Object} params + * @param {FlashAssessmentAlgorithm } params.algorithm + * @param {Array} params.challenges + * @param {Array} params.allAnswers + **/ static fromChallengesAndAnswers({ algorithm, challenges, allAnswers }) { const capacityAndErrorRateHistory = algorithm.getCapacityAndErrorRateHistory({ allAnswers,