chore(ags): fix some typing stuff
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
681e356c26
commit
248ba1281c
7 changed files with 6 additions and 31 deletions
|
@ -92,7 +92,6 @@ export default () => {
|
|||
],
|
||||
}),
|
||||
}).hook(SystemTray, (self) => {
|
||||
// @ts-expect-error
|
||||
self.reveal_child = systray.get_children().length > 0;
|
||||
});
|
||||
};
|
||||
|
|
|
@ -43,10 +43,8 @@ export default (window) => Box({
|
|||
self.on('toggled', () => {
|
||||
self.toggleClassName(
|
||||
'toggled',
|
||||
// @ts-expect-error
|
||||
self.get_active(),
|
||||
);
|
||||
// @ts-expect-error
|
||||
window.exclusivity = self.get_active() ?
|
||||
'exclusive' :
|
||||
'normal';
|
||||
|
|
|
@ -45,7 +45,7 @@ export const getWorkspaces = (box) => {
|
|||
* @param {boolean} normal
|
||||
*/
|
||||
const Workspace = (id, name, normal = true) => {
|
||||
const fixed = Fixed();
|
||||
const fixed = Fixed({});
|
||||
|
||||
const workspace = Revealer({
|
||||
transition: 'slide_right',
|
||||
|
|
|
@ -121,12 +121,7 @@ export const BluetoothMenu = () => {
|
|||
|
||||
child: ListBox({
|
||||
setup: (self) => {
|
||||
// @ts-expect-error
|
||||
self.set_sort_func(
|
||||
/**
|
||||
* @param {Box} a
|
||||
* @param {Box} b
|
||||
*/
|
||||
(a, b) => {
|
||||
// @ts-expect-error
|
||||
return b.get_children()[0].attribute.dev.paired - // eslint-disable-line
|
||||
|
@ -146,7 +141,6 @@ export const BluetoothMenu = () => {
|
|||
if (!DevList.has(dev) && dev.name) {
|
||||
DevList.set(dev, BluetoothDevice(dev));
|
||||
|
||||
// @ts-expect-error
|
||||
self.add(DevList.get(dev));
|
||||
self.show_all();
|
||||
}
|
||||
|
@ -167,8 +161,7 @@ export const BluetoothMenu = () => {
|
|||
DevList.delete(dev);
|
||||
}
|
||||
else {
|
||||
devWidget.children[0]
|
||||
.reveal_child = false;
|
||||
devWidget.child.reveal_child = false;
|
||||
devWidget.toDestroy = true;
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +177,6 @@ export const BluetoothMenu = () => {
|
|||
const scroll = self.get_parent()?.get_parent();
|
||||
|
||||
if (scroll) {
|
||||
// @ts-expect-error
|
||||
const n_child = self.get_children().length;
|
||||
|
||||
if (n_child > SCROLL_THRESH_N) {
|
||||
|
@ -211,9 +203,7 @@ export const BluetoothMenu = () => {
|
|||
}
|
||||
|
||||
// Trigger sort_func
|
||||
// @ts-expect-error
|
||||
self.get_children().forEach(
|
||||
/** @param {Box} ListBoxRow */
|
||||
(ListBoxRow) => {
|
||||
// @ts-expect-error
|
||||
ListBoxRow.changed();
|
||||
|
|
|
@ -138,12 +138,7 @@ export const NetworkMenu = () => {
|
|||
|
||||
child: ListBox({
|
||||
setup: (self) => {
|
||||
// @ts-expect-error
|
||||
self.set_sort_func(
|
||||
/**
|
||||
* @param {Box} a
|
||||
* @param {Box} b
|
||||
*/
|
||||
(a, b) => {
|
||||
return b.get_children()[0]
|
||||
// @ts-expect-error
|
||||
|
@ -169,7 +164,6 @@ export const NetworkMenu = () => {
|
|||
else {
|
||||
APList.set(ap.ssid, AccessPoint(ap));
|
||||
|
||||
// @ts-expect-error
|
||||
self.add(APList.get(ap.ssid));
|
||||
self.show_all();
|
||||
}
|
||||
|
@ -191,8 +185,7 @@ export const NetworkMenu = () => {
|
|||
APList.delete(ssid);
|
||||
}
|
||||
else {
|
||||
apWidget.children[0]
|
||||
.reveal_child = false;
|
||||
apWidget.child.reveal_child = false;
|
||||
apWidget.toDestroy = true;
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +201,6 @@ export const NetworkMenu = () => {
|
|||
const scroll = self.get_parent()?.get_parent();
|
||||
|
||||
if (scroll) {
|
||||
// @ts-expect-error
|
||||
const n_child = self.get_children().length;
|
||||
|
||||
if (n_child > SCROLL_THRESH_N) {
|
||||
|
@ -235,9 +227,7 @@ export const NetworkMenu = () => {
|
|||
}
|
||||
|
||||
// Trigger sort_func
|
||||
// @ts-expect-error
|
||||
self.get_children().forEach(
|
||||
/** @param {Box} ListBoxRow */
|
||||
(ListBoxRow) => {
|
||||
// @ts-expect-error
|
||||
ListBoxRow.changed();
|
||||
|
|
|
@ -12,13 +12,11 @@ export default (rev) => CenterBox({
|
|||
setup: (self) => {
|
||||
// Open at startup if there are players
|
||||
const id = Mpris.connect('changed', () => {
|
||||
// @ts-expect-error
|
||||
self.set_active(Mpris.players.length > 0);
|
||||
Mpris.disconnect(id);
|
||||
});
|
||||
|
||||
self.on('toggled', () => {
|
||||
// @ts-expect-error
|
||||
if (self.get_active()) {
|
||||
self.child
|
||||
// @ts-expect-error
|
||||
|
|
Loading…
Reference in a new issue