-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
Add RequiredDeep
type
#614
Conversation
CI fails because of xojs/xo#718. Seems like this was fixed in sindresorhus/eslint-plugin-unicorn#2076. I don't really understand what is going wrong here... |
Is this case handled? #401 (comment) |
Should it handle properties that are promises? I looked at some different implementations of this kind of type and noticed this one handles promises: https://github.com/ts-essentials/ts-essentials/blob/master/lib/deep-required/index.ts |
…into required-deep
Yes! I have added support. |
I think I've handled that case now but I'm not 100% sure. |
source/required-deep.d.ts
Outdated
Multiple call signatures cannot currently be supported due to a TypeScript limitation. | ||
@see https://github.com/microsoft/TypeScript/issues/29732 | ||
*/ | ||
type HasMultipleCallSignatures<T extends (...arguments: any[]) => unknown> = |
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.
Use the type in source/internal.d.ts
.
Thanks :) |
Closes #273
This PR is based on a past attempt (see #401) with all the feedback integrated. The only exception is that I did not change
args
toarguments
because as was helpfully noted this is an error inside a strict context like a module.