flickr-sdk icon indicating copy to clipboard operation
flickr-sdk copied to clipboard

Add generated typescript definitions as part of build

Open seleb opened this issue 3 years ago • 2 comments

Adds a new script build-types, which generates typescript definitions for the client class (using a similar pattern to build-rest).

Note: this is not comprehensive. Response types are only partially defined (they aren't in the existing json schema), and the plugins are not defined, but this still greatly improves the explorability and autocomplete of the API in a TS environment.

seleb avatar May 12 '21 03:05 seleb

looks like the CI is failing, but only on node < 8, and it looks like master is red as well; is the legacy node support required?

seleb avatar May 12 '21 05:05 seleb

The other day I was thinking that it would be a great improvement

ebisbe avatar Sep 04 '22 18:09 ebisbe

@jeremyruppel is there any reason to having here doing nothing instead of shipping it?

After building it I see 2 missing parts:


// not comprehensive
type FlickrResponse = Promise<{
	body: any;
	ok: boolean;
}>;

and

// TODO: define static classes
	OAuth: any;
	Feeds: any;
	Upload: any;
	Replace: any;

ebisbe avatar Apr 26 '23 15:04 ebisbe

@ebisbe thanks for the nudge, I'm ready to get this shipped. I'll fix those TODOs in main.

jeremyruppel avatar Apr 26 '23 18:04 jeremyruppel

I did nothing. It's all thanks to @seleb !!

ebisbe avatar Apr 27 '23 08:04 ebisbe

Yes of course! Amazing work @seleb!

jeremyruppel avatar Apr 27 '23 16:04 jeremyruppel