-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Asserting against type parameters (possible with dtslint) #64
Comments
Have you tried |
That fails with |
You are right, it should work. We have a predefined list of errors that are catched by I've added the diagnostics code to the list of errors that should be swallowed by expectError(createTypedPgHelper<number>()) |
Released as 0.13.1 |
We have a function
which should be used like
createTableInterface<keyof Tables, Tables>()
where
Tables
is some generated type.Slightly hacky but I think the only way to allow the user to provide the
Tables
interface that conforms to a particular shape.With
dtslint
we could write tests likewhich assert/document the behaviour of the type parameters are correct.
Tests like this don't seem to be possible with
tsd
. Is it something that could be supported? Are they just bad tests?Thanks.
The text was updated successfully, but these errors were encountered: