Open fredericrous opened 6 months ago
running into the same issue
Workaround is to create "zustand-middleware-yjs.d.ts" and have it in the "include" section of you ts config.
declare module 'zustand-middleware-yjs' {
import { StateCreator, StoreMutatorIdentifier } from 'zustand';
import * as Y from 'yjs';
type Yjs = <
T extends unknown,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
>(
doc: Y.Doc,
name: string,
f: StateCreator<T, Mps, Mcs>,
) => StateCreator<T, Mps, Mcs>;
const _default: Yjs;
export default _default;
}
Describe the bug
typings for zustand-middleware-yjs cannot be imported, see the error message
⚠ Error (TS7016) |
Could not find a declaration file for module/project/node_modules/.pnpm/zustand-middleware-yjs@1.3.1_@types+react@18.2.64_react@18.2.0/node_modules/zustand-middleware-yjs/dist/yjs.mjs
implicitly has an