Closed Rafael94 closed 3 weeks ago
I can run it locally without any problems and everything works fine.
This might be related to WebStorm.
Do you have a working reproduction / have you tried this in VSCode?
I am sure that the error is not due to the IDE.
As soon as I run ng build I get the same error.
I have just quickly created a minimal example. The store is located in projects/library/src/lib
As soon as ng build library
is executed, the error is displayed.
Thanks @Rafael94
Which @ngrx/* package(s) are the source of the bug?
signals
Minimal reproduction of the bug/regression with instructions
I am using signalStore with a nested object and get the following error message from Webstorm and when compiling:
The inferred type of 'MyService' cannot be named without a reference to 'node_modules/@ngrx/signals/src/deep-signal'. This is likely not portable. A type annotation is necessary.
I can run it locally without any problems and everything works fine.
I use it in an angular library and not directly in a angular project.
If I set the
declaration
intsconfig.json
tofalse
, it works.If I add the entry export
{ DeepSignal } from './deep-signal'
; in/node_modules/@ngrx/signals/src/index.d.ts
, the compilation also works.Expected behavior
No error message should appear when compiling (
ng build
).Probably only
export { DeepSignal } from ‘./deep-signal’
has to be added toindex.ts
.Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
@ngrx/signals: 18.0.0-beta.1 Angular: 18.0.1
Other information
No response
I would be willing to submit a PR to fix this issue