Constructor
new BaseWithOptions(options)
Parameters:
Name | Type | Description |
---|---|---|
options | object |
- Since
- 1.13.0
- Deprecated
- since 3.15.0 use
Monster.Types.Base
withMonster.Types.equipWithInternal
instead.
- since 3.15.0 use
- Copyright
- schukai GmbH
- License
- AGPLv3
Example
import {BaseWithOptions} from '@schukai/monster/source/types/basewithoptions.mjs';
class My extends BaseWithOptions {
get defaults() {
return Object.assign({}, super.defaults, {
mykey: true
});
}
}
Members
defaults
This getter provides the options.
This getter provides the options. Derived classes overwrite this getter with their own values. It is good karma to always include the values from the parent class.
get defaults() {
return Object.assign({}, super.defaults, {
mykey: true
});
}
Methods
getOption(path, defaultValue) → {*}
nested options can be specified by path a.b.c
nested options can be specified by path a.b.c
Parameters:
Name | Type | Description |
---|---|---|
path | string | |
defaultValue | * |
- Since
- 1.10.0
Returns:
- Type:
- *