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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Typescript support for afterCreate #1054
base: master
Are you sure you want to change the base?
Add Typescript support for afterCreate #1054
Conversation
Hi, thanks for this PR! To answer your question, we do test the typescript definitions in CI: https://github.com/miragejs/miragejs/runs/7725993547?check_suite_focus=true#step:6:1, and it looks like they are passing in this PR. However, there's a formatting error that is failing. You can run |
It looks like our prettier commands are not working the way we want. Sorry to ask you this, but could you run |
Forgetting to run prettier always bytes me on PRs. For my own repos I put husky in place to run prettier on commits just to avoid that |
Hm, I'm not sure why there's a failure on my last run. I just ran the |
That's strange. OK, don't worry about it, I'll look into it. Thanks again for putting together the PR. |
I'm testing this out in my own app and getting a lot of type errors. I'll try to figure out what's going on and report back. |
To address #1052. Includes a test in
factory-test.ts
.By the way, in that test file,
// $ExpectError
still shows as a TS error, although that might just be for me in Webstorm.// @ts-expect-error
, placed above the line, shows no red wavy line. Although I don't know if there's a similar equivalent for$ExpectType
. @zoltan-nz is there anywhere that these "tests" are run or anything?I would be happy to swap those error assertions as part of this PR, or alternatively in a separate PR, if you'd like. Let me know!
(馃コ my first OSS PR!)