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

Add generated typescript definitions as part of build #141

Merged
merged 4 commits into from
Apr 26, 2023

Conversation

seleb
Copy link
Contributor

@seleb seleb commented May 12, 2021

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.

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
Copy link
Contributor Author

seleb commented May 12, 2021

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?

@ebisbe
Copy link
Contributor

ebisbe commented Sep 4, 2022

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

@ebisbe
Copy link
Contributor

ebisbe commented Apr 26, 2023

@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;

@jeremyruppel
Copy link
Member

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

@jeremyruppel jeremyruppel merged commit b63431d into flickr:main Apr 26, 2023
@seleb seleb deleted the ts branch April 26, 2023 22:07
@ebisbe
Copy link
Contributor

ebisbe commented Apr 27, 2023

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

@jeremyruppel
Copy link
Member

Yes of course! Amazing work @seleb!

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

Successfully merging this pull request may close these issues.

3 participants