diff --git a/addon/components/feature-controls.js b/addon/components/feature-controls.js index ec82720..76cca0f 100644 --- a/addon/components/feature-controls.js +++ b/addon/components/feature-controls.js @@ -5,10 +5,21 @@ import { camelize } from '@ember/string' import windowUtil from 'ember-feature-controls/utils/window' import { getOwner } from '@ember/application' +/** + * @typedef {Object} FeatureFlag + * @property {string} key + * @property {boolean} isEnabled + * @property {unknown} default + * @property {unknown} reload + */ + export default class FeatureControlsComponent extends Component { @service features @service featureControlsStorage + /** @type {Array} */ + model = [] + get featureFlags() { return this.args.featureFlags ? this.args.featureFlags : this._featureFlags }