getWindowsByType (type) {
    if (!WindowType[type.toUpperCase()]) {
      console.error(`"${type}" is not a valid window type.`)
    }
    const { windows } = this
    const result = []
    for (const [key, value] of windows) {
      if (value.type === type) {
        result.push({
          id: key,
          win: value
        })
      }
    }
    return result
  }
@param {WindowType} type the WindowType one of ['base', 'editor', 'settings']
@returns {{id: number, win: BaseWindow}[]} Return the windows of the given {type}