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

An example in Typescript #50

Open
pme123 opened this issue Jan 25, 2017 · 8 comments
Open

An example in Typescript #50

pme123 opened this issue Jan 25, 2017 · 8 comments

Comments

@pme123
Copy link

pme123 commented Jan 25, 2017

I had some problems using polymer-redux with Typescript. So I created an example that helped me fixing them:
https://github.com/pme123/polymer-redux-typescript-example

It is based on a Javascript version:
https://github.com/jdomzhang/polymer-redux-example

It works - but I have 2 remaining open points:

  • statePath of the State definition is an extension of Polymer.property - throws transpile exception
  • PolymerRedux has no Typings - throws transpile exception

Nothing blocking but I hope to solve them some time.

@tur-nr
Copy link
Owner

tur-nr commented Jan 30, 2017

Hey, thanks alot. I don't know much about TypeScript so I didn't do the Typings.

How are you going with the remaining points?

@pme123
Copy link
Author

pme123 commented Jan 30, 2017

Sadly I'm also not a Typescript expert (at least not yet;). So for now the next steps for me are:

@tur-nr
Copy link
Owner

tur-nr commented Dec 6, 2017

Closing issue due to lack of response/interest in TypeScript.

@tur-nr tur-nr closed this as completed Dec 6, 2017
@MrMcGibblets
Copy link

Hi, I know this is closed, however, we need some basic typings to carry on using polymer-redux in our project. I can go about this 2 ways, I can create a separate NPM module that people can use to install the types separately or we can ship an index.d.ts file alongside the index.js (with a reference) the file isn't going to be very big (less than 20 lines) which just gives the very basic of types for this, others can add to it later should they wish. Typescript works by searching all files including the node_modules folder for .ts or d.ts files, so there is no extra config required, simply just this file. My question is which way would you prefer, I'm happy to create a PR to add this single file, a separate NPM module, will require more managing.

@tur-nr
Copy link
Owner

tur-nr commented Mar 5, 2018

Please, add the index.d.ts file to the repo. This would be great. I don't use TS for coding, however I'm a big fan of DefinitelyTyped.

@tur-nr tur-nr reopened this Mar 5, 2018
@infrarosso78
Copy link

+1 trying to slowly rewrite my polymer 1.9/redux app into poly3 with typescript. I've just started and i think i'm going to try using your example. Let's see where i'll get

@infrarosso78
Copy link

i've managed to make everything in order to work, except for the polymer-redux .d.ts file. Can anyone help about this?
Thanks

@MrMcGibblets
Copy link

MrMcGibblets commented Aug 1, 2018

As long as you have an index.d.ts in the root, in the using project Typescript will find all of these. The trouble that I forsee is that the specific typings of polymer that we also want is only available in polymer itself and not there typings that they released.

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

No branches or pull requests

4 participants