Skip to content

Commit

Permalink
jsdoc: Link between Task.allDateFields and AllTaskDateFields
Browse files Browse the repository at this point in the history
  • Loading branch information
claremacrae committed Aug 18, 2024
1 parent 10ed88d commit de4256a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DateTime/DateFieldTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import type { Task } from '../Task/Task';
export type HappensDate = keyof Pick<Task, 'startDate' | 'scheduledDate' | 'dueDate'>;

// NEW_TASK_FIELD_EDIT_REQUIRED - if new field is a date field.
/**
* See also {@link Task.allDateFields}
*/
export type AllTaskDateFields = keyof Pick<
Task,
'cancelledDate' | 'createdDate' | 'doneDate' | 'dueDate' | 'scheduledDate' | 'startDate' // alphabetical order, please.
Expand Down
3 changes: 3 additions & 0 deletions src/Task/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,9 @@ export class Task extends ListItem {
return true;
}

/**
* See also {@link AllTaskDateFields}
*/
public static allDateFields(): (keyof Task)[] {
return [
'createdDate' as keyof Task,
Expand Down

0 comments on commit de4256a

Please sign in to comment.