gw2api-client icon indicating copy to clipboard operation
gw2api-client copied to clipboard

Migrate to TypeScript

Open queicherius opened this issue 5 years ago • 7 comments

queicherius avatar May 10 '19 18:05 queicherius

This would be useful so other devs don't need to define files like https://github.com/Archomeda/gw2-console/blob/master/types/gw2api-client.d.ts

darthmaim avatar Apr 21 '20 11:04 darthmaim

I am currently working on a migration, but obviously, the process is quite cumbersome as defining all possible response types takes a lot of time.

What's the scope of this issue? Just a basic migration with several result types available and some possible still being any, or a full migration with all types being present?

ogrady avatar Apr 23 '23 11:04 ogrady

I am currently working on a migration, but obviously, the process is quite cumbersome as defining all possible response types takes a lot of time.

Yeah, I tried auto-generating some types before as well, but the quality of those was pretty meh.

What's the scope of this issue? Just a basic migration with several result types available and some possible still being any, or a full migration with all types being present?

I think the goal is definitely full type support with all types. But I'd be more than happy to merge a PR with some types, it doesnt have to be all of them. 👍 Maybe even start with something small, so we can align the style.

queicherius avatar Apr 23 '23 18:04 queicherius

Okay, I'll just poke a bit around and see how far I can get. It may actually require slight adjustments in the API if you'd like to have the types as strict as possible, as the rolling schema version is hard to express via types. I will open a PR as soon as I have a somewhat stable state. Just wanted to make sure the issue is still relevant beforehand. :)

ogrady avatar Apr 23 '23 19:04 ogrady

Any update on this @ogrady @queicherius ?

bmeulmeester avatar Dec 05 '23 17:12 bmeulmeester

Hi everyone,

I defined most endpoints manually in my fork, but then got swamped with other projects and irl stuff. I hope to continue at some point, maybe around the holidays, but there is still a truckload of work to do. I started semi-automating the process of reading the types from the wiki, which brought more consistency into the types. But the ones I did before that would require at least a second round to double-check them and carry over the comments from the wiki. After that, we still need to assign the types to each endpoint, add testing, etc.

tl;dr: I have made good progress but had to pause.

ogrady avatar Dec 05 '23 17:12 ogrady