Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
tachibana-shin authored and zikaari committed Sep 27, 2022
1 parent 3904459 commit 81c4b7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/internal/endpoint-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface EndpointRuntime {
onMessage: <Data extends JsonValue, K extends DataTypeKey = DataTypeKey>(
messageID: K,
callback: OnMessageCallback<GetDataType<K, Data>, GetReturnType<K, any>>
) => void
) => (() => void)
/**
* @internal
*/
Expand Down Expand Up @@ -181,6 +181,7 @@ export const createEndpointRuntime = (
},
onMessage: (messageID, callback) => {
onMessageListeners.set(messageID, callback)
return () => onMessageListeners.delete(messageID)
},
}
}

0 comments on commit 81c4b7f

Please sign in to comment.