-
Notifications
You must be signed in to change notification settings - Fork 207
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
dtslint changes output type based on $ExpectType values #632
Comments
marekdedic
changed the title
dtslint changes outputtype based on $ExpectType values
dtslint changes output type based on $ExpectType values
Mar 8, 2023
9 tasks
I managed to track the issue down to DefinitelyTyped-tools/packages/dtslint/src/rules/expectRule.ts Lines 414 to 420 in 15d48f4
So... it seems TypeScript itself is changing the type output based on the surroundings? |
Ok, I'm dumb, the 2 errors were on different TS versions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm looking at commit 886607f and trying to get the tests to pass by modifying Line 379.
Currently I get the error:
however, if I change the expected value to be the returned value, I get
so it seems like dtslint can't decide whether it wants the type parameter (
"edit"
is actually the default value) or not.The text was updated successfully, but these errors were encountered: