Support multiple types & update toJSON#2304
Support multiple types & update toJSON#2304github-actions[bot] merged 9 commits intomicrosoft:mainfrom
Conversation
|
Thanks for the PR! This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged. |
|
What do you think @lgarron |
src/build/patches.ts
Outdated
| function handleMultipleTypes( | ||
| typeNodes: Node[], | ||
| returns?: Value, | ||
| ): DeepPartial<Typed> | DeepPartial<Typed>[] | undefined { |
There was a problem hiding this comment.
It's DeepPartial<Typed> | undefined, no? It never returns an array.
And this function should be called handleTyped and the singular version should be called handleSingleTypeNode or something.
src/build/patches.ts
Outdated
| ...optionalMember("overrideType", "string", child.properties?.overrideType), | ||
| ...(typeNode | ||
| ? handleTyped(typeNode) | ||
| ? handleSingleTypeNode(typeNode) |
There was a problem hiding this comment.
Why? properties can have union types too. handleSingleTypeNode should not be called outside handleTyped.
src/build/patches.ts
Outdated
| const subType = | ||
| type.children.length > 0 ? handleTyped(type.children[0]) : undefined; | ||
| type.children.length > 0 | ||
| ? handleSingleTypeNode(type.children[0]) |
There was a problem hiding this comment.
And subtypes can be union too
|
Done |
src/build/patches.ts
Outdated
|
|
||
| function handleTyped( | ||
| typeNodes: Node[], | ||
| returns?: Value, |
There was a problem hiding this comment.
returns? you mean property?
There was a problem hiding this comment.
Yes, I forgot to include it i will fix it
There was a problem hiding this comment.
I have renamed it
|
Better? |
|
Is there any thing missing here @saschanaz |
baselines/dom.generated.d.ts
Outdated
|
|
||
| interface AuthenticationExtensionsClientOutputsJSON { | ||
| appid?: boolean; | ||
| appidExclude?: boolean; |
There was a problem hiding this comment.
Looks like this has no implementation, otherwise seems good
|
LGTM, thanks! |
|
Merging because @saschanaz is a code-owner of all the changes - thanks! |
fixes #2114