Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] @ngrx/signals: DeepSignal is not exported #4372

Closed
1 of 2 tasks
Rafael94 opened this issue Jun 3, 2024 · 3 comments · Fixed by #4377
Closed
1 of 2 tasks

[Bug] @ngrx/signals: DeepSignal is not exported #4372

Rafael94 opened this issue Jun 3, 2024 · 3 comments · Fixed by #4377

Comments

@Rafael94
Copy link

Rafael94 commented Jun 3, 2024

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 in tsconfig.json to false, 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 to index.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

  • Yes
  • No
@timdeschryver
Copy link
Member

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?

@Rafael94
Copy link
Author

Rafael94 commented Jun 5, 2024

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.

https://github.com/Rafael94/signal-store-test

@timdeschryver
Copy link
Member

Thanks @Rafael94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants