Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type BufferedChangeset doesn't expose underlying data properties for templates using Glint. #658

Open
abueloshika opened this issue Oct 14, 2022 · 0 comments

Comments

@abueloshika
Copy link

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']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant