Skip to content

Commit 062f479

Browse files
Update types and jsdoc
1 parent c61f88c commit 062f479

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/modules/quizzes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Quizzes {
127127
* @param {array} [parameters.answers] - An array of answers in the format [[1,2], [1], ["true"], ["seen"], [""]]. Based on the question type, answers should either be an integer, "true"/"false", "seen" or an empty string ("") if skipped
128128
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.com/reference/configuration-quizzes
129129
* @param {string} [parameters.quizSessionId] - Session identifier for the quiz. Session ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.com/reference/configuration-quizzes
130-
* @param {boolean} [parameters.skipTracking] - Boolean value indicating if tracking for this question has to be skipped. Might be useful, when you are willing to preload first question of the quiz.
130+
* @param {boolean} [parameters.skipTracking] - If true, tracking for this question will be skipped. This is useful for preloading the first question of a quiz
131131
* @param {object} [networkParameters] - Parameters relevant to the network request
132132
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
133133
* @returns {Promise}

src/types/quizzes.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export interface QuizzesParameters {
1919
answers?: any[];
2020
quizVersionId?: string;
2121
quizSessionId?: string;
22+
}
23+
24+
export interface NextQuestionQuizzesParameters extends QuizzesParameters {
2225
skipTracking?: boolean;
2326
}
2427

@@ -43,7 +46,7 @@ declare class Quizzes {
4346

4447
getQuizNextQuestion(
4548
quizId: string,
46-
parameters?: QuizzesParameters,
49+
parameters?: NextQuestionQuizzesParameters,
4750
networkParameters?: NetworkParameters
4851
): Promise<NextQuestionResponse>;
4952

0 commit comments

Comments
 (0)