feat: add eslint-plugin-tsdoc (#430)
* feat: add eslint-plugin-tsdoc * feat(doc): update current jsdoc to tsdoc specification * chore: update deps * feat: update warn to error for jsdoc and tsdoc * chore(doc): lint
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* Represents cached data with its fetch timestamp
|
||||
* @template T The type of the cached data
|
||||
*/
|
||||
export type CachedData<T> = {
|
||||
data: T;
|
||||
|
||||
@@ -95,8 +95,9 @@ export class Course {
|
||||
|
||||
/**
|
||||
* Gets a list of all the conflicts between this course and another course (i.e. if they have a meeting at the same time)
|
||||
* @param other another course to compare this course to
|
||||
* @returns a list of all the conflicts between this course and the other course as a tuple of the two conflicting meetings
|
||||
*
|
||||
* @param other - Another course to compare this course to
|
||||
* @returns A list of all the conflicts between this course and the other course as a tuple of the two conflicting meetings
|
||||
*/
|
||||
getConflicts(other: Course): [CourseMeeting, CourseMeeting][] {
|
||||
const conflicts: [CourseMeeting, CourseMeeting][] = [];
|
||||
|
||||
@@ -48,9 +48,10 @@ export class CourseMeeting {
|
||||
|
||||
/**
|
||||
* Whether or not this meeting conflicts with another meeting
|
||||
* MWF 10:00 am - 11:00 am conflicts with a F 10:00 am - 10:30 am
|
||||
* @param meeting the meeting to check for conflicts with
|
||||
* @returns true if the given meeting conflicts with this meeting, false otherwise
|
||||
*
|
||||
* @remarks MWF 10:00 am - 11:00 am conflicts with a F 10:00 am - 10:30 am
|
||||
* @param meeting - The meeting to check for conflicts with
|
||||
* @returns True if the given meeting conflicts with this meeting, false otherwise
|
||||
*/
|
||||
isConflicting(meeting: CourseMeeting): boolean {
|
||||
const { days, startTime, endTime } = this;
|
||||
@@ -64,8 +65,9 @@ export class CourseMeeting {
|
||||
|
||||
/**
|
||||
* Return the string representation of the days of the week that this meeting is taught
|
||||
* @param options options for the string representation
|
||||
* @returns string representation of the days of the week that this meeting is taught
|
||||
*
|
||||
* @param options - Options for the string representation
|
||||
* @returns String representation of the days of the week that this meeting is taught
|
||||
*/
|
||||
getDaysString(options: DaysStringOptions): string {
|
||||
let { format, separator } = options;
|
||||
@@ -86,8 +88,9 @@ export class CourseMeeting {
|
||||
|
||||
/**
|
||||
* Return the string representation of the time range for the course
|
||||
* @param options options for the string representation
|
||||
* @returns string representation of the time range for the course
|
||||
*
|
||||
* @param options - Options for the string representation
|
||||
* @returns String representation of the time range for the course
|
||||
*/
|
||||
getTimeString(options: TimeStringOptions): string {
|
||||
const { startTime, endTime } = this;
|
||||
|
||||
@@ -20,9 +20,10 @@ export class CourseSchedule {
|
||||
|
||||
/**
|
||||
* Given a string representation of the meeting information for a class, parse it into a CourseMeeting object
|
||||
* @param dayLine a string representation of the days of the week that the course is taught: MWF, TR, etc.
|
||||
* @param timeLine a string representation of a time-range that the course is taught: 10:00 am - 11:00 am, 1:00 pm - 2:00 pm, etc.
|
||||
* @param locLine a string representation of the location that the course is taught in: JGB 2.302, etc.
|
||||
*
|
||||
* @param dayLine - A string representation of the days of the week that the course is taught: MWF, TR, etc.
|
||||
* @param timeLine - A string representation of a time-range that the course is taught: 10:00 am - 11:00 am, 1:00 pm - 2:00 pm, etc.
|
||||
* @param locLine - A string representation of the location that the course is taught in: JGB 2.302, etc.
|
||||
* @returns CourseMeeting object representing the meeting information
|
||||
*/
|
||||
static parse(dayLine: string, timeLine: string, locLine: string): CourseMeeting {
|
||||
|
||||
@@ -18,7 +18,8 @@ export default class Instructor {
|
||||
|
||||
/**
|
||||
* Get the URL to the instructor's directory page on the UT Directory website
|
||||
* @returns a URL string to the instructor's directory page
|
||||
*
|
||||
* @returns A URL string to the instructor's directory page
|
||||
*/
|
||||
getDirectoryUrl(): string {
|
||||
const name = this.toString({
|
||||
@@ -36,8 +37,9 @@ export default class Instructor {
|
||||
|
||||
/**
|
||||
* Get a string representation of the instructor
|
||||
* @param options the options for how to format the instructor string
|
||||
* @returns a string representation of the instructor
|
||||
*
|
||||
* @param options - The options for how to format the instructor string
|
||||
* @returns A string representation of the instructor
|
||||
*/
|
||||
toString(options: InstructorFormatOptions): string {
|
||||
const { firstName, lastName, fullName } = this;
|
||||
|
||||
Reference in New Issue
Block a user