YousefED / SyncedStore

SyncedStore CRDT is an easy-to-use library for building live, collaborative applications that sync automatically.
https://syncedstore.org
MIT License
1.75k stars 54 forks source link

add types to export definitions #111

Closed oysteinsigholt closed 1 year ago

oysteinsigholt commented 1 year ago

Exports type declarations for compatibility with typescript module resolution strategies node16/nodenext and bundler.

Resolves the problem:

Could not find a declaration file for module '@syncedstore/core'. '/node_modules/@syncedstore/core/dist/syncedstore.modern.mjs' implicitly has an 'any' type.
  There are types at /node_modules/@syncedstore/core/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@syncedstore/core' library may need to update its package.json or typings.ts(7016)

Should resolve #107 , as the recomended TypeScript (5.x) compiler options for bun.sh appears to be bundler.

YousefED commented 1 year ago

Thanks!