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

Support for polymer-redux #92

Closed
pme123 opened this issue Jan 30, 2017 · 2 comments
Closed

Support for polymer-redux #92

pme123 opened this issue Jan 30, 2017 · 2 comments

Comments

@pme123
Copy link

pme123 commented Jan 30, 2017

I created an example that uses polymer-redux with Typescript:
https://github.com/pme123/polymer-redux-typescript-example

It works - but I have 2 open points. One of them I think I have to address here:

  • polymer-redux extends the Polymer.property with the argument 'statePath' which throws a transpile exception as this argument is not in the defined type.

Is there a way that this will be possible (no transpile problem)?

@nippur72
Copy link
Owner

there are two possible workarounds:

  • the most obvious is to cast to any:
@property({type: Object, statePath: 'customer'} as any)
  • the other is to rewrite the @property decorator, e.g.:
// notice the uppercase "P"
function Property(ob?: any) {
   return property(ob as any);   
}

@pme123
Copy link
Author

pme123 commented Jan 30, 2017

thanks, the first one works well for me (sorry I haven't seen that one)

@kito99 kito99 closed this as completed Oct 27, 2017
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

3 participants