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 return typedef for MondayClientSdk#listen #137

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monday-sdk-js",
"version": "0.5.4",
"version": "0.5.5",
"private": false,
"repository": "https://github.com/mondaycom/monday-sdk-js",
"main": "src/index.js",
Expand Down
3 changes: 2 additions & 1 deletion types/client-data.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export interface ClientData {
* @param typeOrTypes The type, or array of types, of events to subscribe to
* @param callback A callback function that is fired when the listener is triggered by a client-side event
* @param params Reserved for future use
* @return Unsubscribe/unlisten from all added during this method call
*/
listen<
CustomResponse,
Expand All @@ -109,7 +110,7 @@ export interface ClientData {
typeOrTypes: T | ReadonlyArray<T>,
callback: (res: { data: SubscribableEventsResponse<AppFeatureType>[T] & CustomResponse }) => void,
params?: Record<string, any> & { appFeatureType?: AppFeatureType }
): void;
): () => void;

/**
* Set data in your application, such as updating settings
Expand Down
Loading