Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
Update more ScheduledTask Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bdistin committed May 1, 2018
1 parent 6bc1c2b commit f58681d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/schedule/ScheduledTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const { isObject } = require('../util/util');
*/
class ScheduledTask {

/**
* @typedef {(Date|number|Cron|string)} TimeResolveable
*/

/**
* @typedef {Object} ScheduledTaskOptions
* @property {string} [id] The ID for the task. By default, it generates one in base36
Expand All @@ -15,7 +19,7 @@ class ScheduledTask {

/**
* @typedef {Object} ScheduledTaskUpdateOptions
* @property {(Date|number|Cron|string)} [time] The time or {@link Cron} pattern
* @property {TimeResolveable} [time] The time or {@link Cron} pattern
* @property {boolean} [catchUp] If the task should try to catch up if the bot is down
* @property {*} [data] The data to pass to the Task piece when the ScheduledTask is ready for execution
*/
Expand All @@ -35,7 +39,7 @@ class ScheduledTask {
* @since 0.5.0
* @param {KlasaClient} client The client that initialized this instance
* @param {string} taskName The name of the task this ScheduledTask is for
* @param {(Date|number|string)} time The time or Cron pattern
* @param {TimeResolveable} time The time or {@link Cron} pattern
* @param {ScheduledTaskOptions} [options={}] The options for this ScheduledTask instance
*/
constructor(client, taskName, time, options = {}) {
Expand Down Expand Up @@ -195,7 +199,7 @@ class ScheduledTask {
/**
* Resolve the time and cron
* @since 0.5.0
* @param {(Date|number|Cron|string)} time The time or Cron pattern
* @param {TimeResolveable} time The time or {@link Cron} pattern
* @returns {any[]}
* @private
*/
Expand Down

0 comments on commit f58681d

Please sign in to comment.