-
Notifications
You must be signed in to change notification settings - Fork 34
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
TypeScript definition #61
Comments
Thanks for raising this! I have wanted to support Typescript features for a while but not had time to implement it, especially as I’m fairly new to Typescript. To clarify:
|
I'm able to use this module but I need some workarounds to not have type errors
Yes I think is the only thing needed to make it work properly Other examples are: |
Glad you can still run this module, albeit with some workarounds. Thanks for the examples, sounds like a good change. I'm currently fixing another bug (issue 54) but will look into this when I have time. Happy to take a PR earlier if you fancy it |
@nya1 would you like to pull that branch to check it solves your issue? Would also appreciate suggestions to improve the Declaration File and README, as I'm not sure what a TypeScript user would like to see. |
I'll give a try this weekend, it looks good, maybe I think the return type |
Thanks! Re chaining other chai methods, I seem to be able to - these are hitting the expect(res).to.satisfyApiSpec.and.to.equal('foo');
expect(obj).to.satisfySchemaInApiSpec(schemaName).and.to.equal('foo'); (Not that I would recommend chaining after either of our assertions) |
Thanks for checking the Declaration File works. I've released it in 0.8.0 so feel free to close this when you're happy. 0.8.0 also makes the assertion failure messages much more informative, so any feedback (especially problems) with that will be appreciated! |
Hello,
I would like to use this module in my typescript project but currently is missing the extended chai methods such as
satisfySchemaInApiSpec
, it would be nice to have the typescript definitionThe text was updated successfully, but these errors were encountered: