Skip to content

Commit

Permalink
Fix types and related docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed Dec 9, 2024
1 parent 4ab6a6d commit 6ff2e20
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/compy/export/BaseComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class BaseComponent {
/**
* Configuration for this component, or `null` if it does not have one.
*
* @type {?object}
* @type {?BaseConfig}
*/
#config;

Expand Down Expand Up @@ -90,8 +90,8 @@ export class BaseComponent {
}

/**
* @returns {?object} Configuration object for this instance, or `null` if it
* has no associated configuration. If non-`null`, this is an instance of
* @returns {?BaseConfig} Configuration object for this instance, or `null` if
* it has no associated configuration. If non-`null`, this is an instance of
* {@link #CONFIG_CLASS}.
*/
get config() {
Expand Down Expand Up @@ -444,9 +444,9 @@ export class BaseComponent {
static #configClass = new Map();

/**
* @returns {function(new:object, object)} The expected configuration class
* for this class. Subclasses should not override this; instead they should
* override {@link #_impl_configClass}.
* @returns {function(new:BaseConfig, object)} The expected configuration
* class. for this class. Subclasses should not override this; instead they
* should override {@link #_impl_configClass}.
*/
static get CONFIG_CLASS() {
const already = BaseComponent.#configClass.get(this);
Expand Down Expand Up @@ -535,13 +535,16 @@ export class BaseComponent {
}

/**
* @returns {function(new:object, object)} The expected configuration class
* for this class. This (base) class calls this method exactly once to get the
* value to return from {@link #CONFIG_CLASS}.
* Gets the expected configuration class for this class. This (base) class
* calls this method exactly once to get the value to return from {@link
* #CONFIG_CLASS}.
*
* The default value is a configuration class which adds `name` as an optional
* configuration property, on top of (optional) `class` as defined by
* {@link #BaseConfig}.
*
* @returns {function(new:BaseConfig, object)} The expected configuration
* class.
*/
static _impl_configClass() {
return class Config extends BaseConfig {
Expand Down

0 comments on commit 6ff2e20

Please sign in to comment.