You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @ersimont - thanks for the report. I hadn't considered this case, but my first instinct is to say that .toEqualTypeOf should be as strict as possible in any doubt. So I am ok with the fact these showing an error for now.
A couple other things worth noting:
.toMatchTypeOf passes in both cases
the typescript-eslint rule consistent-indexed-object-style autofixes normal in your example with Record<string, Date> which makes the tests as you have them show no errors, so arguably if following "best practices" this is a non-issue.
You have highlighted a UX problem though - the error message could be more helpful. Unfortunately TypeScript doesn't currently allow for dynamic type errors (see mmkal/ts#152) so in general there is some debugging required when expect-type finds any errors. But I'll keep this open and see if I can find a way to make the error message give a better hint of where to start looking/what it's actually highlighting.
Hello, and thank you for the
expect-type
library!I ran into what might be an issue. Or maybe I misunderstand something. Should these pass:
They both show this error:
The text was updated successfully, but these errors were encountered: