Add missing @param declarations in API docs

This commit is contained in:
Joel Low
2020-10-06 09:04:05 +08:00
parent 906e593a54
commit f88cc8846b
3 changed files with 11 additions and 5 deletions
@@ -31,6 +31,8 @@ export class SingleConnectionDatabaseManager {
* Creates a new SingleConnectionDatabaseManager instance by reading from the `backend`
* config section, specifically the `.database` key for discovering the management
* database configuration.
*
* @param config The loaded application configuration.
*/
static fromConfig(config: Config): SingleConnectionDatabaseManager {
return new SingleConnectionDatabaseManager(
@@ -52,6 +54,8 @@ export class SingleConnectionDatabaseManager {
/**
* Generates a PluginDatabaseManager for consumption by plugins.
*
* @param pluginId The plugin that the database manager should be created for. Plugin names should be unique.
*/
forPlugin(pluginId: string): PluginDatabaseManager {
const _this = this;
@@ -19,7 +19,7 @@ import { merge } from 'lodash';
/**
* Merges database objects together
*
* @param config The base config
* @param config The base config. The input is not modified
* @param overrides Any additional overrides
*/
export function mergeDatabaseConfig(config: any, ...overrides: any[]) {
@@ -24,10 +24,12 @@ export interface PluginDatabaseManager {
* getClient provides backend plugins database connections for itself.
*
* The purpose of this method is to allow plugins to get isolated data
* stores so that plugins are discouraged from database integration. Plugins
* can omit the `database` parameter to get the default plugin database, or
* provide an identifier that will be used to identify a separate database
* from the default.
* stores so that plugins are discouraged from database integration.
*
* @param database This parameter can be omitted to get the default plugin
* database, or provide an identifier that will be used to identify a
* separate database from the default to connect to. This can be used for
* application-level sharding.
*/
getClient(database?: string): Promise<knex>;
}