Gimp.Item.id_is_valid

function id_is_valid(item_id: Number(gint)): Boolean {
    // Gjs wrapper for gimp_item_id_is_valid()
}
  

Returns true if the item ID is valid.

This procedure checks if the given item ID is valid and refers to an existing item.

*Note*: in most use cases, you should not use this function. If you got a [class@Gimp.Item] from the API, you should trust it is valid. This function is mostly for internal usage.

Since 3.0

item_id

The item ID to check.

Returns

Whether the item ID is valid.