TypeScript Definitions for Speedrun.com's API
2 years ago
Australia

Hi all,

I've been writing typescript definitions for speedrun.com's API (https://github.com/speedruncomorg/api) for a few weeks now to make it easier to work with.

Here it is: https://github.com/mitchell-merry/src-ts And here's a project I've written with the types: https://github.com/mitchell-merry/srcom-data-generator (scrapes data & loads it into a google sheets document with certain formatting).

I'd ideally like to contribute this to the DefinitelyTyped types repository (@types, https://github.com/DefinitelyTyped/DefinitelyTyped).

Please, if you're familiar with TypeScript, take a look at the definitions. I'd love to hear any constructive feedback you might have (first time doing this sort of thing), and feel free to contribute to the repo yourself. I'd especially like to hear if I've done anything in a particularly obtuse way / if there are cleaner ways to do certain things, or if I've not followed certain best practices.

Thanks!

Edit: I should note that there is no support for bulk access and requests other than GET for now.

Modificato da l'autore 2 years ago
RaggedDan, Oxknifer e 2 Altri ti piace questo
Switzerland

Hey nice job! Would be nice to have a @types/speedruncom package instead of something because I'm already building my own ui and I would love to not have any extra runtime dependencies. I might just yank the type definitions directly in my project for that reason 👀

Australia

I was recommended by the DefinitelyTyped team (that manages @types) that it wouldn't be good to have there. That was the original goal - but you should just be able to install the package as a dev dependency just fine, would that not solve your issue?

note that i haven't exactly tested this much

Modificato da l'autore 1 year ago