substrate-front-end-template icon indicating copy to clipboard operation
substrate-front-end-template copied to clipboard

Typescript Support

Open Manuelandro opened this issue 4 years ago • 18 comments

Is it something that could interest you? I think i'm gonna implement it on my clone for personal use, but if you'd like I could open a pull request

Manuelandro avatar Oct 10 '21 07:10 Manuelandro

Hey @Manuelandro I have interest in TS too, link here your progress i think i could help.

kamikazebr avatar Oct 14 '21 03:10 kamikazebr

He @Manuelandro @kamikazebr - any word on progress here? :grin:

nuke-web3 avatar Nov 07 '21 19:11 nuke-web3

Is anybody actively developing on this? I've started work on migrating the template over to TypeScript.

tarrball avatar Dec 16 '21 02:12 tarrball

@NukeManDan @tarrball I had hope @Manuelandro already had some WIP on that, but not got awnser, I have some time to help but not to start of migration.

So @tarrball if you need some sporadic help on that i'll happy support.

kamikazebr avatar Dec 17 '21 04:12 kamikazebr

@kamikazebr I've got the template working with TypeScript, with some package warnings & eslint removed, so there's some work to be done still. I've got the repo forked here to work on it. I'm not sure if that's the best or desired way for me to proceed with development for the greater good, but it's how I started it for myself.

tarrball avatar Dec 17 '21 15:12 tarrball

Hey @tarrball i saw some commits there, amazing! Yah i think fork is way to go working on one branch to PR later. I never worked on fork-fork project, but i have almost sure i just need add new remote, and make amends if necessary on your branch.

About the workflow, i think part will run on Issue on your fork and linked here on that.

What you think need be done there yet? I'll fetch and run on my local

kamikazebr avatar Dec 19 '21 04:12 kamikazebr

@NukeManDan @tarrball i had tested and run the code, its look great. Should create some branch and PR to merge here?

kamikazebr avatar Dec 19 '21 07:12 kamikazebr

I dropped eslint, since it was having build issues (related to webpack in some way, I think), so that's one issue. There are couple other minor things (like having to hard code the color in the transaction button component) that I hastily did to get things building.

Other than that, other questions/concerns I have are: I don't know how this fits in with the current repo. Is there a desire to replace what's in place with a TypeScript solution, or is there a desire to maintain both? Are there any code snippers or tutorials that would need to be updated to note the changes?

tarrball avatar Dec 20 '21 00:12 tarrball

I've got this working fully now without any issues.

tarrball avatar Dec 22 '21 23:12 tarrball

cool @tarrball ! :grin: .... maybe a PR here? I think we could maintain an alt branch of this with your support that is pure TS... or with the maintainers buy-in, move to this over js.

nuke-web3 avatar Dec 23 '21 19:12 nuke-web3

@kamikazebr @NukeManDan PR opened -> #223

tarrball avatar Dec 26 '21 16:12 tarrball

Made some enhancements to this PR here --> https://github.com/tarrball/substrate-front-end-template/pull/1 Hope this will bring us closer to a strongly typed template. Cheers.

fuzzc0re avatar Jan 06 '22 21:01 fuzzc0re

I've made good progress on this and kept current with the main branch on my own fork, but I'm not sure how far to go with the typings. Do we want to create typings that match all the pallets/RPC's in the main branch? I think avoiding all "any" types is going to be tough.

It's not trivial to rebase each time there are significant change on main, so I'm just wondering what the definition of "done" is on this issue?

tarrball avatar Feb 23 '22 02:02 tarrball

@tarrball are you working on this issue still? I wanna jump to help. Let get it done?

@NukeManDan may help to solve it as I wanna help Tarrball to follow it.

langdon0003 avatar Jun 07 '22 17:06 langdon0003

@langdon0003 no I haven't done anything on this since my last comment, but it doesn't seem like much has changed in this repo since then, so it seems like it's stable enough to make the switch to TS. As long as there is enough buy-in and a good definition of "done" to work toward (as mentioned a few months ago).

tarrball avatar Jun 08 '22 19:06 tarrball

@langdon0003 no I haven't done anything on this since my last comment, but it doesn't seem like much has changed in this repo since then, so it seems like it's stable enough to make the switch to TS. As long as there is enough buy-in and a good definition of "done" to work toward (as mentioned a few months ago).

I am currently checking on this repo [email protected]:tarrball/substrate-front-end-template.git at "ts/main" branch but It look like still have done yet.

Am I checkout right repo? Could you update the latest and work one? Thank you so much!

langdon0003 avatar Jun 10 '22 13:06 langdon0003

@langdon0003 the last time I rebased, it was into this branch https://github.com/tarrball/substrate-front-end-template/tree/ts-again. I got pretty far into it but it's been silent for a while so I haven't messed with it since

tarrball avatar Jun 20 '22 19:06 tarrball

@tarrball Does your last version work? I can't really get the version running from the https://github.com/tarrball/substrate-front-end-template/tree/ts-again and from this repository for Typescript.

Chralt98 avatar Sep 14 '22 17:09 Chralt98