-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Programmatic API #37
Comments
Instead of throwing, it might be more useful if it returned the list of errors? Then you can verify that it has none or do something else with them? |
also fine |
I agree this would be very useful. Even more so if usage was possible from the import { expectType } from "tsd";
interface Person {
name: string;
friends: Person[];
}
const personA = {
name: "Joe",
friends: [personB],
};
const personB = {
name: "Jack",
friends: [personA],
};
try {
expectType<Person>(personA);
} catch(e) {} Internally, |
@harrysolovay Could you create a new issue so we can discuss it separately? I feel these are two separate use cases and before I decide if we should add it, I want to discuss things as to why it would be useful. |
@SamVerschueren thank you! I'm opening the new issue right now 💯 |
hi, hello, @SamVerschueren seems this issue is close/done/finish/stable (?) and already have readme wrote at master but may you make a dist-tag on npm?
|
I wanted to ship something else in the new release as well but need more time to think some things through. Will make a new release this afternoon. |
This feature is shipped in |
Hello and thank you for creating this!
A programmatic API would be useful so one can use it as part of e.g. Jest or AVA test suite without running separate binary for this and allowing for easy watch mode. API could look something like:
And tsd could raise an exception if issues are found
The text was updated successfully, but these errors were encountered: