add docstring in JsPsych.ts for getCitations()

This commit is contained in:
Cherrie Chang 2024-12-18 16:50:24 -05:00
parent 909ac917b0
commit ca6c4eb63b

View File

@ -261,6 +261,14 @@ export class JsPsych {
return this.timeline?.description.timeline;
}
/**
* Prints out a string containing citations for the jsPsych library and all input plugins/extensions in the specified format.
* If called without input, prints citation for jsPsych library.
*
* @param plugins The plugins/extensions to generate citations for. Always prints the citation for the jsPsych library at the top.
* @param format The desired output citation format. Currently supports "apa" and "bibtex".
* @returns String containing citations separated with newline character.
*/
getCitations(
plugins: Array<Class<JsPsychPlugin<any>> | Class<JsPsychExtension>> = [],
format: "apa" | "bibtex" = "apa"