-
-
Notifications
You must be signed in to change notification settings - Fork 578
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
ReadonlyDeep
: Fix handling of objects with call signatures
#359
Conversation
491f069
to
16a7a70
Compare
16a7a70
to
25b24bc
Compare
Do you think it should be handled? |
…natures instead just leave them as be (mutable)
25b24bc
to
d179825
Compare
ReadonlyDeep
: Fix handling of objects with call signatures
@sindresorhus It's a rare case but probably should be handled for completeness. Edit: Actually I don't think it's possible to to make a native map or set callable. Thus this will be a very rare case. |
I agree. It would be great if you could handle it then. |
@sindresorhus I've made that change locally to support maps and sets but then I realized that with how this type currently works, only native maps and sets are supported. As native map and set can't be made callable (as far as I know), my local change will have no benefit. I'd say the PR is currently ready in its current state. |
Thanks :) |
partial fix of #337
Makes objects with a call signatures readonly.
Limitations:
Current this PR assumes that any object that has an call signatures is not a map or set. I can extends this PR to handle maps and sets with call signatures.