correct typing on typedef methods

This commit is contained in:
Baipyrus 2024-02-11 02:53:28 +01:00
parent b76e772ee2
commit bdb08c1810
3 changed files with 9 additions and 9 deletions

View File

@ -4,8 +4,8 @@ import { DataTypes, Sequelize } from 'sequelize';
* @typedef {Object} Message * @typedef {Object} Message
* @property {string} id A Discord message ID. * @property {string} id A Discord message ID.
* @property {(model: Object) => void} hasMany Defines an One-To-Many relationship. * @property {(model: Object) => void} hasMany Defines an One-To-Many relationship.
* @property {(conditions: Object) => void} findOne Finds one instance in the database matching the provided condition(-s). * @property {(conditions: Object) => Promise<Message>} findOne Finds one instance in the database matching the provided condition(-s).
* @property {(conditions: Object) => void} findAll Finds all instances in the database matching the provided condition(-s). * @property {(conditions: Object) => Promise<Array<Message>>} findAll Finds all instances in the database matching the provided condition(-s).
*/ */
/** /**

View File

@ -7,8 +7,8 @@ import { DataTypes, Deferrable, Sequelize } from 'sequelize';
* @property {string} role A Discord role ID. * @property {string} role A Discord role ID.
* @property {string} emoji Either a unicode emoji or a string representation in Discord custom emoji format. * @property {string} emoji Either a unicode emoji or a string representation in Discord custom emoji format.
* @property {(model: Object) => void} hasMany Defines an One-To-Many relationship. * @property {(model: Object) => void} hasMany Defines an One-To-Many relationship.
* @property {(conditions: Object) => void} findOne Finds one instance in the database matching the provided condition(-s). * @property {(conditions: Object) => Promise<RoleEmojiPair>} findOne Finds one instance in the database matching the provided condition(-s).
* @property {(conditions: Object) => void} findAll Finds all instances in the database matching the provided condition(-s). * @property {(conditions: Object) => Promise<Array<RoleEmojiPair>>} findAll Finds all instances in the database matching the provided condition(-s).
*/ */
/** /**

View File

@ -6,8 +6,8 @@ import { DataTypes, Sequelize } from 'sequelize';
* @property {boolean} create Whether or not this channel is registered to create customs when joined. * @property {boolean} create Whether or not this channel is registered to create customs when joined.
* @property {(string|null)} owner The owner of this channel, if not registered for customs. * @property {(string|null)} owner The owner of this channel, if not registered for customs.
* @property {(model: Object) => void} hasMany Defines an One-To-Many relationship. * @property {(model: Object) => void} hasMany Defines an One-To-Many relationship.
* @property {(conditions: Object) => void} findOne Finds one instance in the database matching the provided condition(-s). * @property {(conditions: Object) => Promise<VoiceChannel>} findOne Finds one instance in the database matching the provided condition(-s).
* @property {(conditions: Object) => void} findAll Finds all instances in the database matching the provided condition(-s). * @property {(conditions: Object) => Promise<Array<VoiceChannel>>} findAll Finds all instances in the database matching the provided condition(-s).
*/ */
/** /**