definitelytyped-firefox-webext-browser
definitelytyped-firefox-webext-browser copied to clipboard
Fix converting array of a union type
The following property, defined in the browser.menus schema, represents an array of either integers or strings:
"menuIds": {
"description": "A list of IDs of the menu items that were shown.",
"type": "array",
"items": {
"choices": [
{ "type": "integer" },
{ "type": "string" }
]
}
}
This commit changes the generated type from:
interface _OnShownInfo {
/** A list of IDs of the menu items that were shown. */
menuIds: number | string[];
...
}
to:
interface _OnShownInfo {
/** A list of IDs of the menu items that were shown. */
menuIds: Array<number | string>;
...
}
I've totally missed this PR. Apologies for that. I don't have time right now but I'll make sure to take a look soon. Thanks for the PR :D
Thanks!, sorry it took me so unbelievable long to get around to merging.