chore: convert more files to TypeScript (#18820)
This commit is contained in:
parent
134d76dcdd
commit
c79613b037
11 changed files with 84 additions and 73 deletions
|
@ -22,7 +22,7 @@ function completeURL (project: string, path: string) {
|
|||
return invokeSync('ELECTRON_INSPECTOR_CONFIRM', message, title) as boolean
|
||||
}
|
||||
|
||||
const useEditMenuItems = function (x: number, y: number, items: any[]) {
|
||||
const useEditMenuItems = function (x: number, y: number, items: ContextMenuItem[]) {
|
||||
return items.length === 0 && document.elementsFromPoint(x, y).some(function (element) {
|
||||
return element.nodeName === 'INPUT' ||
|
||||
element.nodeName === 'TEXTAREA' ||
|
||||
|
@ -30,7 +30,7 @@ const useEditMenuItems = function (x: number, y: number, items: any[]) {
|
|||
})
|
||||
}
|
||||
|
||||
const createMenu = function (x: number, y: number, items: any[]) {
|
||||
const createMenu = function (x: number, y: number, items: ContextMenuItem[]) {
|
||||
const isEditMenu = useEditMenuItems(x, y, items)
|
||||
invoke<number>('ELECTRON_INSPECTOR_CONTEXT_MENU', items, isEditMenu).then(id => {
|
||||
if (typeof id === 'number') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue