-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: jsdoc and typings fixes & improvements
- Loading branch information
1 parent
5f84600
commit c845f97
Showing
4 changed files
with
68 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
import { Leveling } from '../Leveling' | ||
|
||
import { IDatabaseStructure } from './databaseStructure.interface' | ||
import { DatabaseType } from './databaseType.enum' | ||
|
||
/** | ||
* A type containing all the {@link Leveling} events and their return types. | ||
* | ||
* Type parameters: | ||
* | ||
* - `TDatabaseType` ({@link DatabaseType}) - The database type that is used. | ||
* - `TDatabaseKey` ({@link string}, optional: defaults to `${string}.leveling`) - The type of database key that will be used in database operations. | ||
* - `TDatabaseValue` ({@link any}, optional: defaults to {@link IDatabaseStructure}) - The type of database content that will be used in database operations. | ||
* | ||
* @typedef {object} ILevelingEvents | ||
* @prop {Leveling<DatabaseType, TDatabaseKey, TDatabaseValue>} ready Emits when the {@link Leveling} module is ready. | ||
* @prop {void} databaseConnect Emits when the connection to the database is established. | ||
* | ||
* @template TDatabaseType The database type that is used. | ||
* @template TDatabaseKey The type of database key that will be used in database operations. | ||
* @template TDatabaseValue The type of database content that will be used in database operations. | ||
*/ | ||
export type ILevelingEvents = { | ||
ready: void | ||
export type ILevelingEvents< | ||
TDatabaseType extends DatabaseType, | ||
TDatabaseKey extends string = `${string}.leveling`, | ||
TDatabaseValue = IDatabaseStructure | ||
> = { | ||
ready: Leveling<TDatabaseType, TDatabaseKey, TDatabaseValue> | ||
databaseConnect: void | ||
// [FILL IN] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters