-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
Update tsd
(and pin TypeScript to current minor)
#839
Conversation
As far as I can understand, there are two failures here:
I guess you saw similar issues before and this is why expectTypeOf(mergeDeep(['life'], [42, true], {arrayMergeMode: 'spread'})).toEqualTypeOf<Array<number | string | boolean>>(); , because type is inferred correctly (in mine and |
Seems like the issue was |
Needs one fix |
Now it properly detects a multiple signature like this as well: type Overloaded2 = {
(foo: number | undefined): string;
(foo: number): string;
}; |
}, | ||
"exclude": [ | ||
// Ignore `WriteableDeep` error temporarily, remove when #833 are fixed. | ||
"test-d/writable-deep.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to add a test to test-d/writable-deep.ts
too? So it doesn't regress again in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sindresorhus Sure, there is a test already, but most tests in both of these are indirect ones which gives some cascading one, I'll add en explicit one 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sindresorhus Done ✔️
Great! Thanks 👍👍 |
As a preparation for #837 and as a companion to #838 I went ahead an updated
tsd
as well to the latest version, but turns out that thetsd
tests are broken in latest version (likewise broken when rewriting to use eg.expect-type
in latest typescript)Fixes #833