Hi i am writig a signal store with Angular 18 and “@ngrx/signals”: “^17.2.0”,
the code is retunrnig me this error:
error TS2742: The inferred type of ‘x’ cannot be named without a reference to ‘../../../../../../../node_modules/@ngrx/signals/src/deep-signal’. This is likely not portable. A type annotation is necessary.
the error appear only if i use nested object, if not its ok
and this is the code
import { signalStore, withState } from '@ngrx/signals';
import { SidebarSettingsState} from '../types';
const initialState: SidebarSettingsState = {
theme: 'sidebar-dark',
collapsed: false,
logo: {
theme: 'bg-blue',
},
};
export const SidebarSettingsStore = signalStore(
withState<SidebarSettingsState>(initialState)
);
I tried many thins, ChatGPT, TabNine, and adding type any, but with any i have problems in template accessing the data
Mauro Alexandre is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.