chore: remove bunch of usages of any (#27512)
This commit is contained in:
parent
c7aa35a519
commit
79b3393768
16 changed files with 101 additions and 81 deletions
|
@ -231,12 +231,12 @@ function sortTemplate (template: (MenuItemConstructorOptions | MenuItem)[]) {
|
|||
function generateGroupId (items: (MenuItemConstructorOptions | MenuItem)[], pos: number) {
|
||||
if (pos > 0) {
|
||||
for (let idx = pos - 1; idx >= 0; idx--) {
|
||||
if (items[idx].type === 'radio') return (items[idx] as any).groupId;
|
||||
if (items[idx].type === 'radio') return (items[idx] as MenuItem).groupId;
|
||||
if (items[idx].type === 'separator') break;
|
||||
}
|
||||
} else if (pos < items.length) {
|
||||
for (let idx = pos; idx <= items.length - 1; idx++) {
|
||||
if (items[idx].type === 'radio') return (items[idx] as any).groupId;
|
||||
if (items[idx].type === 'radio') return (items[idx] as MenuItem).groupId;
|
||||
if (items[idx].type === 'separator') break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue