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 type definitions to return types on functions createRequestError and formatGraphQLErrors #96

Closed
deluksic opened this issue Mar 30, 2020 · 4 comments · Fixed by #97
Closed
Labels

Comments

@deluksic
Copy link
Contributor

deluksic commented Mar 30, 2020

These functions (createRequestError and formatGraphQLErrors) don't have return type annotations. When using this library with typescript in strict mode, builds fail.

@deluksic
Copy link
Contributor Author

Looking at the original flow types, I guess these should be actual types:

export function createRequestError(request: RelayRequestAny, response?: RelayResponse): RRNLRequestError;
export function formatGraphQLErrors(request: RelayRequest, errors: GraphQLResponseErrors): string;

@nodkz
Copy link
Collaborator

nodkz commented Mar 31, 2020

🎉 This issue has been resolved in version 4.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nodkz nodkz added the released label Mar 31, 2020
@nirvdrum
Copy link
Contributor

nirvdrum commented Apr 3, 2020

Sorry for the headache. I introduced the original definitions. I run TypeScript in strict mode, so I'm not sure why I didn't see the same thing you did. But, thanks for fixing.

@deluksic
Copy link
Contributor Author

deluksic commented Apr 3, 2020

No worries! Maybe different typescript version? I was running latest ts.

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

Successfully merging a pull request may close this issue.

3 participants