AUR0229
Error Message
Description
Cause
Solution
Example
import { bindable, customElement } from 'aurelia';
// Assume we are trying to configure 'prop1' and 'prop2'
// Incorrect: The configuration object has a definition ({ primary: true })
// but lacks the property name key (e.g., 'prop1') it applies to.
// This specific syntax might be hard to achieve directly but illustrates the concept.
// A more likely scenario is dynamic generation producing an invalid structure.
/*
@bindable({
prop1: {}, // Correct entry
{}: { primary: true } // Incorrect entry - missing property name key
})
*/
@customElement({ name: 'my-component-incorrect', template: `...` })
export class MyComponentIncorrect {
prop1: string = 'value1';
prop2: number = 123;
}
// Correct: Each entry in the configuration object has a string key ('prop1', 'prop2')
// corresponding to a property name in the class.
@bindable({
prop1: {},
prop2: { primary: true }
})
@customElement({ name: 'my-component-correct', template: `...` })
export class MyComponentCorrect {
prop1: string = 'value1';
prop2: number = 123;
}Debugging Tips
Last updated
Was this helpful?