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

Issues with ember-component-css and ember-cli-typescript #329

Open
psbanka opened this issue Jul 26, 2019 · 3 comments
Open

Issues with ember-component-css and ember-cli-typescript #329

psbanka opened this issue Jul 26, 2019 · 3 comments

Comments

@psbanka
Copy link

psbanka commented Jul 26, 2019

Hello. I am having an issue with the latest ember-cli-typescript and ember-component-css. I'm getting a

Cannot set property styleNamespace of [object Object] which has only a getter

Sometimes a person needs to use the styleNamespace attribute within, for example, a computed properties of the component, and it's therefore useful to define styleNamespace: string within the class so that TypeScript can type-check it properly. This, however, results in the above error.

Any ideas?

@webark
Copy link
Owner

webark commented Aug 12, 2019

@psbanka and this is in the component, not a controller correct?

@psbanka
Copy link
Author

psbanka commented Aug 15, 2019

Yes, that is correct

@webark
Copy link
Owner

webark commented Aug 17, 2019

https://github.com/ebryn/ember-component-css/blob/6c669ed44deb26d66b9ee98641fd3d10a53fcf49/addon/initializers/component-styles.js#L37-L41

you could redefine the whole computed property. Or maybe we could move the setting of this to the init.

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

2 participants