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

Silence errors matched by .toRaiseError() #17

Open
mrazauskas opened this issue Nov 16, 2023 · 1 comment
Open

Silence errors matched by .toRaiseError() #17

mrazauskas opened this issue Nov 16, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@mrazauskas
Copy link
Member

Errors matched by .toRaiseError() should not be highlighted in code editors. This must work similar to the // @ts-expect-error comment, but should take into account provided substring or error code.

@mrazauskas
Copy link
Member Author

I was looking through some type tests. Mostly .toRaiseError() is used to make sure that a property does not exist on a type or that a function cannot be called with certain arguments. Hm.. What about .not.toHaveProperty() and .not.toBeCallableWith() matchers?

For my eye the new matchers are better solution than silencing errors via language service. Also because the matcher will make it possible passing a file through tsc compiler (see #13).


The new .toHaveProperty() matcher just shipped with TSTyche 1.0.0-beta.6. Give it a try.

@mrazauskas mrazauskas modified the milestones: TSTyche 1.0, TSTyche 2.0 Jan 28, 2024
@mrazauskas mrazauskas modified the milestone: TSTyche 2.0 Feb 17, 2024
@mrazauskas mrazauskas removed this from the TSTyche 3.0 milestone Mar 29, 2024
@mrazauskas mrazauskas added wontfix This will not be worked on and removed enhancement New feature or request labels Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant