ember-changeset
ember-changeset copied to clipboard
Type BufferedChangeset doesn't expose underlying data properties for templates using Glint.
This could well be something I am doing wrong as I am new to Glint and Typescript.
If I have something like:
//a-component.ts
import { BufferedChangeset } from 'ember-changeset/types';
import type ItemModelClass from "/path/to/class"
export default class AComponent extends Comopnent {
//say the model property is assigned an ember data model in the constructor
model: ItemModelClass
item: BufferedChangeset = Changeset(this.model, () => true, {}, {})
}
//a-component.hs
{{this.item.propertyOnItemModel}}
Glint doesn't seem to be able to understand that there are properties of the underlying Changeset model in the BufferedChangeset and reports an error for each instance of a property with Property 'notes_updated_by' comes from an index signature, so it must be accessed with ['notes_updated_by']