yjs / y-websocket

Websocket Connector for Yjs
https://docs.yjs.dev/ecosystem/connection-provider/y-websocket
MIT License
526 stars 263 forks source link

fix: add type declaration in package.json #138

Open thorseraq opened 1 year ago

thorseraq commented 1 year ago

Fix potential errors when import using import {WebsocketProvider} from 'y-websocket'; in typescript project

TS7016: Could not find a declaration file for module 'y-websocket'. '/Users/xiaotian/WebstormProjects/affine-demo-thorseraq/node_modules/.pnpm/y-websocket@1.5.0_yjs@13.6.0/node_modules/y-websocket/src/y-websocket.js' implicitly has an 'any' type.   There are types at '/Users/xiaotian/WebstormProjects/affine-demo-thorseraq/node_modules/y-websocket/dist/src/y-websocket.d.ts', but this result could not be resolved when respecting package.json "exports". The 'y-websocket' library may need to update its package.json or typings.

image