yjs / y-webrtc

WebRTC Connector for Yjs
MIT License
448 stars 109 forks source link

Allow keys on service options to be optional #30

Closed ijdickinson closed 2 years ago

ijdickinson commented 2 years ago

This commit addresses yjs/y-webrtc#29 by adding a TypeScript @type hint for the options to the WebRtcProvider constructor. This hint explicitly marks each key of the options object as optional.

For example:

     * @type {{
     *  signaling?: string[] | null,

identifies that signaling may be omitted when passing the options object.

dmonad commented 2 years ago

Thank you for providing a fix! I just merged #27 which fixes the same problem.