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

TypeScript definitions for publish callback #1278

Closed
deskoh opened this issue Apr 8, 2019 · 4 comments
Closed

TypeScript definitions for publish callback #1278

deskoh opened this issue Apr 8, 2019 · 4 comments

Comments

@deskoh
Copy link
Contributor

@deskoh deskoh commented Apr 8, 2019

Referencing following lines:

publish (callback: (data: T, hook: HookContext<T>) => Channel): this;

publish (event: string, callback: (data: T, hook: HookContext<T>) => Channel): this;

The callback should be a function that could return null as documented here.

@daffl
Copy link
Member

@daffl daffl commented Apr 8, 2019

This has been fixed this weekend. It will be published with Feathers 4.

@deskoh
Copy link
Contributor Author

@deskoh deskoh commented Apr 12, 2019

Any timeline when Feathers 4 will be published?

@deskoh
Copy link
Contributor Author

@deskoh deskoh commented Apr 12, 2019

This has been fixed this weekend. It will be published with Feathers 4.

Looking at the PR #1275 merge to master branch, the callback return type still does not include Channel[] | void

publish (callback: (data: T, hook: HookContext<T>) => Channel): this;

publish (event: string, callback: (data: T, hook: HookContext<T>) => Channel): this;

Unlike

publish<T> (callback: (data: T, hook: HookContext<T>) => Channel | Channel[] | void): Application<ServiceTypes>;

publish<T> (event: string, callback: (data: T, hook: HookContext<T>) => Channel | Channel[] | void): Application<ServiceTypes>;

Is there any other branch that contains the fix?

@deskoh
Copy link
Contributor Author

@deskoh deskoh commented Jul 3, 2019

Closed by #1396

@deskoh deskoh closed this Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.