You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example get errors in the function because it can not resolve store types
constentity=type<Product>();exportconstProductsLocalStore=signalStore(withEntities({ entity }),withSyncToWebStorage({key: 'sdsd',type: 'local',filterState: ({ entities })=>({ entities }),//ERROR entities can not be resolved}),withStateLogger({name: 'sdsd',filterState: ({ entities })=>({ entities }),//ERROR entities can not be resolved}),withState({test: 'test',foo: 'foo',bar: false,}),withSyncToRouteQueryParams({mappers: [{queryParamsToState: (query,store)=>{patchState(store,{test: query.test,foo: query.foo,bar: query.bar==='true',});},stateToQueryParams: (store)=>computed(()=>({test: store.test(),//ERROR test, foo and bar can not be resolvedfoo: store.foo(),bar: store.bar().toString(),})),},],}),);
This was not caught by test because it seems to be a bug in how the functions are compiled when return type of the triat is not especified for example:
In the left is how is now and causes the error, on the right is the fix, which is been explicit with the return types.
This also fixes using the library with skibLibCheck: false #91
The text was updated successfully, but these errors were encountered:
Made the return type explicit for withSyncToWebStorage, withStateLogger and
withSyncToRouteQueryParams, before the were inferred which worked fine in the examples inside the
project but when compiled as lib, causes a problem were the functions inside the traits can not
correctly infer the store , this also fixes using the library with skipLibCheck: false
Fixes#145 , #91
Made the return type explicit for withSyncToWebStorage, withStateLogger and
withSyncToRouteQueryParams, before the were inferred which worked fine in the examples inside the
project but when compiled as lib, causes a problem were the functions inside the traits can not
correctly infer the store , this also fixes using the library with skipLibCheck: false
Added missing docs, for typedCallConfig
Fixes#145 , #91
The following example get errors in the function because it can not resolve store types
This was not caught by test because it seems to be a bug in how the functions are compiled when return type of the triat is not especified for example:
In the left is how is now and causes the error, on the right is the fix, which is been explicit with the return types.
This also fixes using the library with skibLibCheck: false #91
The text was updated successfully, but these errors were encountered: