JoaoPauloLousada / ngx-zustand

This package provides a Zustand adapter for Angular apps.
MIT License
32 stars 1 forks source link

have errors of ts witch library #10

Open l337quez opened 1 year ago

l337quez commented 1 year ago

I don't understand why these errors appear with the library, can someone help me. thank you

Information: "typescript": "~4.0.2" Angular CLI: 11.0.7 Node: 14.19.1 OS: linux x64

the errors:

Build at: 2023-11-09T12:49:24.967Z - Hash: f7bcd2d370c48f38868f - Time: 7962ms

Error: node_modules/ngx-zustand/lib/zustand-base.service.d.ts:13:53 - error TS1005: '>' expected.

13 useStore(selector: Parameters<typeof useStore<T, S>>[1]): Observable; ~ node_modules/ngx-zustand/lib/zustand-base.service.d.ts:13:58 - error TS1005: ',' expected.

13 useStore(selector: Parameters<typeof useStore<T, S>>[1]): Observable; ~ node_modules/ngx-zustand/lib/zustand-base.service.d.ts:13:63 - error TS1005: ';' expected.

13 useStore(selector: Parameters<typeof useStore<T, S>>[1]): Observable; ~ node_modules/ngx-zustand/lib/zustand-base.service.d.ts:13:64 - error TS1128: Declaration or statement expected.

13 useStore(selector: Parameters<typeof useStore<T, S>>[1]): Observable; ~ node_modules/ngx-zustand/lib/zustand-base.service.d.ts:13:79 - error TS1005: '(' expected.

13 useStore(selector: Parameters<typeof useStore<T, S>>[1]): Observable; ~ node_modules/ngx-zustand/lib/zustand-base.service.d.ts:14:1 - error TS1128: Declaration or statement expected.

14 } ~

File witch erros: import { Observable } from 'rxjs'; import { StateCreator, StoreApi } from 'zustand/vanilla'; export { StateCreator } from 'zustand/vanilla'; import { useStore } from './use-store'; export declare abstract class ZustandBaseService { private store; constructor(); abstract initStore(): StateCreator; createStore(): StoreApi; getState(): T; setState(payload: Partial): void; useStore(): Observable; useStore(selector: Parameters<typeof useStore<T, S>>[1]): Observable; }

JoaoPauloLousada commented 5 months ago

it might be the case where the lib uses a more updated ts and cli version. I can't guarantee it is compatible with your current version.