microsoft / TypeScript Public
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
in operator typeguard can widen types
#46403
base: main
Are you sure you want to change the base?
Conversation
in operator typeguard now can widen typesin operator typeguard can widen types
|
I have signed the CLA, however, I have no idea what to do with the code that is not my own - my layman's interpretation of the CLA is that if @ShuiRuTian signed the CLA as well, than it should all be OK. However, I can't check that he did. |
|
Ok, I simplified it to |
…t with getPropertyOfType
|
Not worried, I signed the CLA too. The changes until now looks good to me. And please refer this commnet #39746 (comment) |
| function widenObjectType(type: ObjectType, newSymbol: Symbol): Type { | ||
| const members = createSymbolTable(); | ||
| if (type.members !== undefined) { | ||
| mergeSymbolTable(members, type.members); |
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.
Hi, @weswigham
I was directed to your comment, however, I don't really know what to do with it. Ideally, I think I would like to clone the symbol table and just add the new symbol to it (that way there are no merges), but I can't figure out how to clone a symbol table :/
Fixes #21732
This PR is a continuation of #39746 - thanks @ShuiRuTian for his work. I have made the branch up-to-date with
mainand fixed new test breakages. As I am not the original author of most of the changes, I would greatly appreciate a review either from @ShuiRuTian or the maintainers of TS.Submission containing materials of a third party: @ShuiRuTian
Please verify that:
Backlogmilestone (required)mainbranchgulp runtestslocallyThe text was updated successfully, but these errors were encountered: