Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect types for Gio.ActionMap.add_action_entries #153

Open
vixalien opened this issue Mar 13, 2024 · 0 comments
Open

Incorrect types for Gio.ActionMap.add_action_entries #153

vixalien opened this issue Mar 13, 2024 · 0 comments
Labels
gjs-convention Marks issues for aligning with GJS coding standards and practices

Comments

@vixalien
Copy link

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;
@JumpLink JumpLink added the gjs-convention Marks issues for aligning with GJS coding standards and practices label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gjs-convention Marks issues for aligning with GJS coding standards and practices
Projects
None yet
Development

No branches or pull requests

2 participants