From 10a9303157fdf7ee37d4ec1299903e988756b02c Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Sat, 4 Nov 2023 18:53:07 +0000 Subject: [PATCH] refactor: declare missing `model` field --- addon/components/feature-controls.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 }