update signal test to use vitest expectTypeOf#5127
update signal test to use vitest expectTypeOf#5127santoshyadavdev wants to merge 4 commits intongrx:mainfrom
Conversation
✅ Deploy Preview for ngrx-io ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
| /Property 'numbers' is missing in type '{ count: number; foo: string; }'/ | ||
| ); | ||
| const state = signalState({ count: 1, foo: 'bar' }); | ||
| void (() => { |
There was a problem hiding this comment.
Why is this in a callback function?
There was a problem hiding this comment.
Ohh no leftover, I will replace it, I thought I already did
There was a problem hiding this comment.
@timdeschryver i think we need arrow function, earlier these calls were string so no actual call was happening, but If i dont wrap it around arrow function, ts will execute addNumber and it will always throw exception as its not an array, let me know if there is some clean way to do this
rainerhahnekamp
left a comment
There was a problem hiding this comment.
@santoshyadavdev. Looks reasonable to me at first sight. Still have to check it thoroughly, but it seems we will settle down with a combination of @ts-expect-error and Vitest type assertions?
Yes you are right, I will fix some pending code and linter soon |
|
Do I get it right that @rainerhahnekamp Would be be still interested to check out TSTyche? (Based on #4935 (comment)). I could put together a similar PR. One of the advantages, there would be no need for |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Closes #
What is the new behavior?
uses expectTypeOf for type testing, this closed #4935 partially
Does this PR introduce a breaking change?
Other information