Skip to content

linkedSignal bug #206

Answered by Ookamini95
Ookamini95 asked this question in Q&A
Jan 11, 2025 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

Thank you for your response, but I've managed to understand more over the span of the afternoon and managed to fix it finally.
While your thesis is really interesting, and eventually lead me to the solution, it is not completely right. I won't lie, I don't understand completely the bug, but I've managed a better working minimal reproduction of the bug (I got really angry not gonna lie)

@Injectable({ providedIn: 'root' })
export class SomeService {
  // ERROR
  test = {
    wow: () => console.log(this.#data()),
  };
  res = this.test.wow();

  #data = signal({
    data: [0, 1, 2],
  });


  // NO ERROR
  // test = {
  //  wow: () => console.log(this.data()),
  // };
  // res = this.test.wo…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Ookamini95
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Ookamini95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #205 on January 12, 2025 13:19.