Incorrect types for `Gio.ActionMap.add_action_entries`
vixalien opened this issue · 0 comments
vixalien commented
The function is overridden in GJS at https://gitlab.gnome.org/GNOME/gjs/-/blob/master/modules/core/overrides/Gio.js?ref_type=heads#L827.
The correct type should be something like this:
export type ActionEntry = {
name: string;
parameter_type?: string;
state?: string;
activate?: (
_source: Gio.SimpleAction,
parameter: GLib.Variant | null,
) => void;
change_state?: (
_source: Gio.SimpleAction,
value: GLib.Variant | null,
) => void;
};
export type AddActionEntries = (entries: ActionEntry[]) => void;