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

fix: export type for registerEndpoints #128

Merged
merged 4 commits into from
Feb 28, 2022
Merged

fix: export type for registerEndpoints #128

merged 4 commits into from
Feb 28, 2022

Conversation

JimLiu
Copy link

@JimLiu JimLiu commented Feb 25, 2022

No description provided.

Copy link
Member

@dbushong dbushong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename the commit message to fix: ... to reflect that we're making the type decls match reality. chore should be reserved for internal package-related issues that don't affect any published behavior.

Comment on lines 36 to 37
registerEndpoint(name: string, endpointFn: EndpointFn): void;
registerEndpoints(endpoints: { [name: string]: EndpointFn }): void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: These should return this

Comment on lines 16 to 18
| ((cb?: any) => FetchResponse)
| {
[key: string]: (options: any, cb?: any) => FetchResponse;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: The arguments to the actual methods don't necessarily include (or start with) a callback, so I'd probably make this (...args: any[]) or some such

@JimLiu JimLiu changed the title chore: export type for registerEndpoints fix: export type for registerEndpoints Feb 25, 2022
Copy link
Member

@dbushong dbushong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💚

@dbushong dbushong merged commit 4eedab7 into main Feb 28, 2022
@dbushong dbushong deleted the type-register branch February 28, 2022 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants