Was able to clear the build errors thusly…
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
columns: computed(function() {
return [
{ name: 'A', valuePath: 'A', width: 180 },
{ name: 'B', valuePath: 'B', width: 180 },
{ name: 'C', valuePath: 'C', width: 180 },
{ name: 'D', valuePath: 'D', width: 180 },
];
}),
rows: computed(function() {
return [
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
{ A: 'A', B: 'B', C: 'C', D: 'D' },
];
})
});
Console is not impressed.
index.js:163 Uncaught Error: Assertion Failed: computed decorators must return an instance of an Ember ComputedProperty descriptor, received function COMPUTED_DECORATOR(target, key, propertyDesc, maybeMeta, isClassicDecorator$$1) {
true && !(true
/* EMBER_NATIVE_DECORATOR_SUPPORT */
|| isClassicDecorator$$1) && (0, _debug.assert)('Native decorators are not enabled without the EMBER_NATIVE_DECORATOR_SUPPORT flag', true || isClassicDecorator$$1);
true && !(isClassicDecorator$$1 || !propertyDesc || !propertyDesc.get || propertyDesc.get.toString().indexOf('CPGETTER_FUNCTION') === -1) && (0, _debug.assert)("Only one computed property decorator can be applied to a class field or accessor, but '" + key + "' was decorated twice. You may have added the decorator to both a getter and setter, which is unecessary.", isClassicDecorator$$1 || !propertyDesc || !propertyDesc.get || propertyDesc.get.toString().indexOf('CPGETTER_FUNCTION') === -1);
let meta$$1 = arguments.length === 3 ? (0, _meta2.meta)(target) : maybeMeta;
desc.setup(target, key, propertyDesc, meta$$1);
return {
enumerable: desc.enumerable,
configurable: desc.configurable,
get: DESCRIPTOR_GETTER_FUNCTION(key, desc)
};
}
at Object.assert (index.js:163)
at computed.js:30
at decorator.js:43
at component.js:32
at Array.reduce (<anonymous>)
at _applyDecoratedDescriptor (component.js:31)
at Module.callback (component.js:115)
at Module.exports (loader.js:106)
at Module._reify (loader.js:143)
at Module.reify (loader.js:130)
Cue George Strait “I Hate Everything”.