// This is an auto-generated file. Do not edit directly!

/** @noSelfInFile */

/**
 * @noResolution
 */
declare module "factorio:runtime" {
  /**
   * Called when a {@link import("factorio:prototype").CustomInputPrototype CustomInputPrototype} is activated.
   * @example
   * -- This will be raised when a custom input with the name "my-potato-control" and action "lua" is pressed
   * script.on_event("my-potato-control", function(event)
   *   game.print("Keyboard shortcut pressed on tick: " ..tostring(event.tick))
   * end)
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#CustomInputEvent Online documentation}
   */
  interface CustomInputEvent extends EventData {
    /**
     * The player that activated the custom input.
     */
    readonly player_index: PlayerIndex
    /**
     * The prototype name of the custom input that was activated.
     */
    readonly input_name: string
    /**
     * The mouse cursor position when the custom input was activated.
     */
    readonly cursor_position: MapPosition
    /**
     * Cursor direction.
     */
    readonly cursor_direction?: defines.direction
    /**
     * The mouse cursor display location when the custom input was activated.
     */
    readonly cursor_display_location: GuiLocation
    /**
     * Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected.
     */
    readonly selected_prototype?: SelectedPrototypeData
    /**
     * The GUI element under the cursor when the custom input was activated.
     */
    readonly element?: LuaGuiElement
    /**
     * If the cursor was over any GUI when the custom input was activated.
     */
    readonly in_gui: boolean
    /**
     * Identifier of the event
     */
    readonly name: defines.events
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an achievement is gained.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_achievement_gained Online documentation}
   */
  interface OnAchievementGainedEvent extends EventData {
    /**
     * The player who gained the achievement.
     */
    readonly player_index: PlayerIndex
    readonly achievement: LuaAchievementPrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_achievement_gained
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a unit/group completes a command.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_ai_command_completed Online documentation}
   */
  interface OnAiCommandCompletedEvent extends EventData {
    /**
     * unit_number/group_number of the unit/group which just completed a command.
     */
    readonly unit_number: UnitNumber
    readonly result: defines.behavior_result
    /**
     * Was this command generated by a distraction.
     */
    readonly was_distracted: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_ai_command_completed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an area of the map is cloned.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_area_cloned Online documentation}
   */
  interface OnAreaClonedEvent extends EventData {
    readonly source_surface: LuaSurface
    readonly source_area: BoundingBox
    readonly destination_surface: LuaSurface
    readonly destination_area: BoundingBox
    readonly destination_force?: LuaForce
    readonly clone_tiles: boolean
    readonly clone_entities: boolean
    readonly clone_decoratives: boolean
    readonly clear_destination_entities: boolean
    readonly clear_destination_decoratives: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_area_cloned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a biter migration builds a base.
   *
   * This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_biter_base_built Online documentation}
   */
  interface OnBiterBaseBuiltEvent extends EventData {
    /**
     * The entity that was built.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_biter_base_built
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a set of positions on the map is cloned.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_brush_cloned Online documentation}
   */
  interface OnBrushClonedEvent extends EventData {
    readonly source_offset: TilePosition
    readonly destination_offset: TilePosition
    readonly source_surface: LuaSurface
    readonly source_positions: TilePosition[]
    readonly destination_surface: LuaSurface
    readonly destination_force?: LuaForce
    readonly clone_tiles: boolean
    readonly clone_entities: boolean
    readonly clone_decoratives: boolean
    readonly clear_destination_entities: boolean
    readonly clear_destination_decoratives: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_brush_cloned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_build_base_arrived Online documentation}
   */
  interface OnBuildBaseArrivedEvent extends EventData {
    /**
     * The unit the command was assigned to.
     */
    readonly unit?: LuaEntity
    /**
     * The unit group the command was assigned to.
     */
    readonly group?: LuaCommandable
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_build_base_arrived
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when player builds something.
   *
   * Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_built_entity Online documentation}
   */
  interface OnBuiltEntityEvent extends EventData {
    /**
     * The entity that was built.
     */
    readonly entity: LuaEntity
    /**
     * The player who did the building.
     */
    readonly player_index: PlayerIndex
    /**
     * A temporary inventory containing all items that the game used to build the entity. This inventory is temporary and thus invalidated after the event.
     */
    readonly consumed_items: LuaInventory
    /**
     * The tags associated with this entity if any.
     */
    readonly tags?: Tags
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_built_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the deconstruction of an entity is canceled.
   *
   * Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cancelled_deconstruction Online documentation}
   */
  interface OnCancelledDeconstructionEvent extends EventData {
    readonly entity: LuaEntity
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cancelled_deconstruction
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the upgrade of an entity is canceled.
   *
   * Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cancelled_upgrade Online documentation}
   */
  interface OnCancelledUpgradeEvent extends EventData {
    readonly entity: LuaEntity
    readonly player_index?: PlayerIndex
    readonly target: LuaEntityPrototype
    readonly quality: LuaQualityPrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cancelled_upgrade
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a cargo pod has delivered its cargo.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cargo_pod_delivered_cargo Online documentation}
   */
  interface OnCargoPodDeliveredCargoEvent extends EventData {
    readonly cargo_pod: LuaEntity
    /**
     * The spawned container if any. Created when destination type is {@link defines.cargo_destination.surface surface}.
     */
    readonly spawned_container?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cargo_pod_delivered_cargo
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a cargo pod departs a surface.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cargo_pod_finished_ascending Online documentation}
   */
  interface OnCargoPodFinishedAscendingEvent extends EventData {
    readonly cargo_pod: LuaEntity
    /**
     * True for pods spawned on a rocket. This event triggers for platform and modded pods as well, but only when true will the pod count towards rocket launch statistics and trigger 'rocket-launched' achievement with objective_condition.
     */
    readonly launched_by_rocket: boolean
    /**
     * The player that is riding the cargo pod, if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cargo_pod_finished_ascending
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a cargo pods lands on a surface, either at a station or on the ground.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cargo_pod_finished_descending Online documentation}
   */
  interface OnCargoPodFinishedDescendingEvent extends EventData {
    readonly cargo_pod: LuaEntity
    /**
     * True for pods spawned on a rocket.
     */
    readonly launched_by_rocket: boolean
    /**
     * The player that is riding the cargo pod, if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cargo_pod_finished_descending
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a cargo pod departs from a space platform hub or by another method not attached to a rocket.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cargo_pod_started_ascending Online documentation}
   */
  interface OnCargoPodStartedAscendingEvent extends EventData {
    readonly cargo_pod: LuaEntity
    /**
     * The player that is riding the cargo pod, if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cargo_pod_started_ascending
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a character corpse expires due to timeout or all of the items being removed from it.
   *
   * this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_character_corpse_expired Online documentation}
   */
  interface OnCharacterCorpseExpiredEvent extends EventData {
    /**
     * The corpse.
     */
    readonly corpse: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_character_corpse_expired
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a chart tag is created.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_chart_tag_added Online documentation}
   */
  interface OnChartTagAddedEvent extends EventData {
    readonly tag: LuaCustomChartTag
    readonly force: LuaForce
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_chart_tag_added
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a chart tag is modified by a player or by script.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_chart_tag_modified Online documentation}
   */
  interface OnChartTagModifiedEvent extends EventData {
    readonly tag: LuaCustomChartTag
    readonly player_index?: PlayerIndex
    readonly force: LuaForce
    readonly old_text: string
    readonly old_icon: SignalID
    readonly old_position: MapPosition
    readonly old_surface: LuaSurface
    readonly old_player_index?: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_chart_tag_modified
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called just before a chart tag is deleted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_chart_tag_removed Online documentation}
   */
  interface OnChartTagRemovedEvent extends EventData {
    readonly tag: LuaCustomChartTag
    readonly force: LuaForce
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_chart_tag_removed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a chunk is charted or re-charted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_chunk_charted Online documentation}
   */
  interface OnChunkChartedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    readonly position: ChunkPosition
    /**
     * Area of the chunk.
     */
    readonly area: BoundingBox
    readonly force: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_chunk_charted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_chunk_deleted Online documentation}
   */
  interface OnChunkDeletedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * The chunks deleted.
     */
    readonly positions: ChunkPosition[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_chunk_deleted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a chunk is generated.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_chunk_generated Online documentation}
   */
  interface OnChunkGeneratedEvent extends EventData {
    /**
     * Area of the chunk.
     */
    readonly area: BoundingBox
    /**
     * Position of the chunk.
     */
    readonly position: ChunkPosition
    /**
     * The surface the chunk is on.
     */
    readonly surface: LuaSurface
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_chunk_generated
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a combat robot expires through a lack of energy, or timeout.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_combat_robot_expired Online documentation}
   */
  interface OnCombatRobotExpiredEvent extends EventData {
    readonly robot: LuaEntity
    /**
     * The entity that owns the robot if any.
     */
    readonly owner?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_combat_robot_expired
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a message is sent to the in-game console, either by a player or through the server interface.
   *
   * This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_console_chat Online documentation}
   */
  interface OnConsoleChatEvent extends EventData {
    /**
     * The player doing the chatting, if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * The chat message that was sent.
     */
    readonly message: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_console_chat
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when someone enters a command-like message regardless of it being a valid command.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_console_command Online documentation}
   */
  interface OnConsoleCommandEvent extends EventData {
    /**
     * The player if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * The command as typed without the preceding forward slash ('/').
     */
    readonly command: string
    /**
     * The parameters provided if any.
     */
    readonly parameters: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_console_command
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a cutscene is cancelled by the player or by script.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cutscene_cancelled Online documentation}
   */
  interface OnCutsceneCancelledEvent extends EventData {
    /**
     * The player the cutscene was shown to.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cutscene_cancelled
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a cutscene finishes naturally (was not cancelled).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cutscene_finished Online documentation}
   */
  interface OnCutsceneFinishedEvent extends EventData {
    /**
     * The player the cutscene was shown to.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cutscene_finished
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a cutscene starts.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cutscene_started Online documentation}
   */
  interface OnCutsceneStartedEvent extends EventData {
    /**
     * The player the cutscene is being shown to.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cutscene_started
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
   *
   * This refers to an index in the table previously passed to set_controller which started the cutscene.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_cutscene_waypoint_reached Online documentation}
   */
  interface OnCutsceneWaypointReachedEvent extends EventData {
    /**
     * The player index of the player viewing the cutscene.
     */
    readonly player_index: PlayerIndex
    /**
     * The index of the waypoint we just completed.
     */
    readonly waypoint_index: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_cutscene_waypoint_reached
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity is cloned. The filter applies to the source entity.
   *
   * Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_cloned Online documentation}
   */
  interface OnEntityClonedEvent extends EventData {
    readonly source: LuaEntity
    readonly destination: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_cloned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after an entity has been recolored either by the player or through script.
   *
   * Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_color_changed Online documentation}
   */
  interface OnEntityColorChangedEvent extends EventData {
    /**
     * The entity that was recolored.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_color_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
   *
   * Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_damaged Online documentation}
   */
  interface OnEntityDamagedEvent extends EventData {
    readonly entity: LuaEntity
    readonly damage_type: LuaDamagePrototype
    /**
     * The damage amount before resistances.
     */
    readonly original_damage_amount: float
    /**
     * The damage amount after resistances.
     */
    readonly final_damage_amount: float
    /**
     * The health of the entity after the damage was applied.
     */
    readonly final_health: float
    /**
     * The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).
     */
    readonly cause?: LuaEntity
    /**
     * The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).
     */
    readonly source?: LuaEntity
    /**
     * The force that did the attacking if any.
     */
    readonly force?: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_damaged
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity dies.
   *
   * Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_died Online documentation}
   */
  interface OnEntityDiedEvent extends EventData {
    /**
     * The entity that died.
     */
    readonly entity: LuaEntity
    /**
     * The entity that did the killing if available.
     */
    readonly cause?: LuaEntity
    /**
     * The loot generated by this entity if any.
     */
    readonly loot: LuaInventory
    /**
     * The force that did the killing if any.
     */
    readonly force?: LuaForce
    /**
     * The damage type if any.
     */
    readonly damage_type?: LuaDamagePrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_died
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when one of an entity's logistic slots changes.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_logistic_slot_changed Online documentation}
   */
  interface OnEntityLogisticSlotChangedEvent extends EventData {
    /**
     * The player who changed the slot, or `nil` if changed by script.
     */
    readonly player_index?: PlayerIndex
    /**
     * The entity for whom a logistic slot was changed.
     */
    readonly entity: LuaEntity
    /**
     * The section changed.
     */
    readonly section: LuaLogisticSection
    /**
     * The slot index that was changed.
     */
    readonly slot_index: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_logistic_slot_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after an entity has been renamed either by the player or through script.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_renamed Online documentation}
   */
  interface OnEntityRenamedEvent extends EventData {
    /**
     * If by_script is true this will not be included.
     */
    readonly player_index?: PlayerIndex
    readonly by_script: boolean
    readonly entity: LuaEntity
    readonly old_name: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_renamed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after entity copy-paste is done.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_settings_pasted Online documentation}
   */
  interface OnEntitySettingsPastedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The source entity settings were copied from.
     */
    readonly source: LuaEntity
    /**
     * The destination entity settings were copied to.
     */
    readonly destination: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_settings_pasted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity is spawned by a EnemySpawner
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_entity_spawned Online documentation}
   */
  interface OnEntitySpawnedEvent extends EventData {
    readonly spawner: LuaEntity
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_entity_spawned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after equipment is inserted into an equipment grid.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_equipment_inserted Online documentation}
   */
  interface OnEquipmentInsertedEvent extends EventData {
    /**
     * The equipment grid inserted into.
     */
    readonly grid: LuaEquipmentGrid
    /**
     * The equipment inserted.
     */
    readonly equipment: LuaEquipment
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_equipment_inserted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after equipment is removed from an equipment grid.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_equipment_removed Online documentation}
   */
  interface OnEquipmentRemovedEvent extends EventData {
    /**
     * The equipment grid removed from.
     */
    readonly grid: LuaEquipmentGrid
    /**
     * The equipment removed.
     */
    readonly equipment: string
    /**
     * The equipment quality.
     */
    readonly quality: string
    /**
     * The count of equipment removed.
     */
    readonly count: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_equipment_removed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the a forces cease fire values change.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_force_cease_fire_changed Online documentation}
   */
  interface OnForceCeaseFireChangedEvent extends EventData {
    /**
     * The force who's cease fire changed.
     */
    readonly force: LuaForce
    /**
     * Which force was added or removed.
     */
    readonly other_force: LuaForce
    /**
     * If the other force was added or removed.
     */
    readonly added: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_force_cease_fire_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a new force is created using `game.create_force()`
   *
   * This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_force_created Online documentation}
   */
  interface OnForceCreatedEvent extends EventData {
    /**
     * The newly created force.
     */
    readonly force: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_force_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the a forces friends change.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_force_friends_changed Online documentation}
   */
  interface OnForceFriendsChangedEvent extends EventData {
    /**
     * The force who's friends changed.
     */
    readonly force: LuaForce
    /**
     * Which force was added or removed.
     */
    readonly other_force: LuaForce
    /**
     * If the other force was added or removed.
     */
    readonly added: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_force_friends_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaForce#reset LuaForce::reset} is finished.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_force_reset Online documentation}
   */
  interface OnForceResetEvent extends EventData {
    readonly force: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_force_reset
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after two forces have been merged using `game.merge_forces()`.
   *
   * The source force is invalidated before this event is called and the name can be re-used in this event if desired.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_forces_merged Online documentation}
   */
  interface OnForcesMergedEvent extends EventData {
    /**
     * The force destroyed.
     */
    readonly source_name: string
    /**
     * The index of the destroyed force.
     */
    readonly source_index: uint32
    /**
     * The force entities where reassigned to.
     */
    readonly destination: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_forces_merged
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when two forces are about to be merged using `game.merge_forces()`.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_forces_merging Online documentation}
   */
  interface OnForcesMergingEvent extends EventData {
    /**
     * The force to be destroyed
     */
    readonly source: LuaForce
    /**
     * The force to reassign entities to.
     */
    readonly destination: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_forces_merging
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, {@link LuaBootstrap#on_init LuaBootstrap::on_init} is not fired.
   *
   * This event is not fired when the scenario is loaded via the map editor.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_game_created_from_scenario Online documentation}
   */
  interface OnGameCreatedFromScenarioEvent extends EventData {
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_game_created_from_scenario
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_checked_state_changed Online documentation}
   */
  interface OnGuiCheckedStateChangedEvent extends EventData {
    /**
     * The element whose checked state changed.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the change.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_checked_state_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} is clicked.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_click Online documentation}
   */
  interface OnGuiClickEvent extends EventData {
    /**
     * The clicked element.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the clicking.
     */
    readonly player_index: PlayerIndex
    /**
     * The mouse button used if any.
     */
    readonly button: defines.mouse_button_type
    /**
     * The display location of the player's cursor.
     */
    readonly cursor_display_location: GuiLocation
    /**
     * If alt was pressed.
     */
    readonly alt: boolean
    /**
     * If control was pressed.
     */
    readonly control: boolean
    /**
     * If shift was pressed.
     */
    readonly shift: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_click
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player closes the GUI they have open.
   *
   * This can only be raised when the GUI's player controller is still valid. If a GUI is thus closed due to the player disconnecting, dying, or becoming a spectator in other ways, it won't cause this event to be raised.
   *
   * It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_closed Online documentation}
   */
  interface OnGuiClosedEvent extends EventData {
    /**
     * The player closing the GUI.
     */
    readonly player_index: PlayerIndex
    /**
     * The type of GUI that was closed.
     */
    readonly gui_type: defines.gui_type
    /**
     * The position of the tile whose GUI was closed.
     */
    readonly tile_position?: TilePosition
    /**
     * The equipment whose GUI was closed.
     */
    readonly equipment?: LuaEquipment
    /**
     * The entity or entity grid whose GUI was closed.
     */
    readonly entity?: LuaEntity
    /**
     * The item whose GUI was closed.
     */
    readonly item?: LuaItemStack
    /**
     * The other player whose GUI was closed.
     */
    readonly other_player?: LuaPlayer
    /**
     * The custom GUI element that was closed.
     */
    readonly element?: LuaGuiElement
    /**
     * The surface index of the global electric network whose GUI was closed.
     */
    readonly surface_index?: SurfaceIndex
    /**
     * The script inventory whose GUI was closed.
     */
    readonly inventory?: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_closed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_confirmed Online documentation}
   */
  interface OnGuiConfirmedEvent extends EventData {
    /**
     * The confirmed element.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the confirming.
     */
    readonly player_index: PlayerIndex
    /**
     * If alt was pressed.
     */
    readonly alt: boolean
    /**
     * If control was pressed.
     */
    readonly control: boolean
    /**
     * If shift was pressed.
     */
    readonly shift: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_confirmed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_elem_changed Online documentation}
   */
  interface OnGuiElemChangedEvent extends EventData {
    /**
     * The element whose element value changed.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the change.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_elem_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} is hovered by the mouse.
   *
   * Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_hover Online documentation}
   */
  interface OnGuiHoverEvent extends EventData {
    /**
     * The element that is being hovered over.
     */
    readonly element: LuaGuiElement
    /**
     * The player whose cursor is hovering.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_hover
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
   *
   * Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_leave Online documentation}
   */
  interface OnGuiLeaveEvent extends EventData {
    /**
     * The element that was being hovered.
     */
    readonly element: LuaGuiElement
    /**
     * The player whose cursor was hovering.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_leave
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_location_changed Online documentation}
   */
  interface OnGuiLocationChangedEvent extends EventData {
    /**
     * The element whose location changed.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the change.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_location_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player opens a GUI.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_opened Online documentation}
   */
  interface OnGuiOpenedEvent extends EventData {
    /**
     * The player closing the GUI.
     */
    readonly player_index: PlayerIndex
    /**
     * The type of GUI that was opened.
     */
    readonly gui_type: defines.gui_type
    /**
     * The position of the tile whose GUI was opened.
     */
    readonly tile_position?: TilePosition
    /**
     * The equipment whose GUI was opened.
     */
    readonly equipment?: LuaEquipment
    /**
     * The entity or entity grid whose GUI was opened.
     */
    readonly entity?: LuaEntity
    /**
     * The item whose GUI was opened.
     */
    readonly item?: LuaItemStack
    /**
     * The other player whose GUI was opened.
     */
    readonly other_player?: LuaPlayer
    /**
     * The custom GUI element that was opened.
     */
    readonly element?: LuaGuiElement
    /**
     * The surface index of the global electric network whose GUI was opened.
     */
    readonly surface_index?: SurfaceIndex
    /**
     * The script inventory whose GUI was opened.
     */
    readonly inventory?: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_opened
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_selected_tab_changed Online documentation}
   */
  interface OnGuiSelectedTabChangedEvent extends EventData {
    /**
     * The tabbed pane whose selected tab changed.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the change.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_selected_tab_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_selection_state_changed Online documentation}
   */
  interface OnGuiSelectionStateChangedEvent extends EventData {
    /**
     * The element whose selection state changed.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the change.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_selection_state_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} switch state is changed (related to switches).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_switch_state_changed Online documentation}
   */
  interface OnGuiSwitchStateChangedEvent extends EventData {
    /**
     * The switch whose switch state changed.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the change.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_switch_state_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} text is changed by the player.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_text_changed Online documentation}
   */
  interface OnGuiTextChangedEvent extends EventData {
    /**
     * The edited element.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the edit.
     */
    readonly player_index: PlayerIndex
    /**
     * The new text in the element.
     */
    readonly text: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_text_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_gui_value_changed Online documentation}
   */
  interface OnGuiValueChangedEvent extends EventData {
    /**
     * The element whose value changed.
     */
    readonly element: LuaGuiElement
    /**
     * The player who did the change.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_gui_value_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a land mine is armed.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_land_mine_armed Online documentation}
   */
  interface OnLandMineArmedEvent extends EventData {
    readonly mine: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_land_mine_armed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_lua_shortcut Online documentation}
   */
  interface OnLuaShortcutEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Shortcut prototype name of the shortcut that was clicked.
     */
    readonly prototype_name: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_lua_shortcut
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
   *
   * Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_marked_for_deconstruction Online documentation}
   */
  interface OnMarkedForDeconstructionEvent extends EventData {
    readonly entity: LuaEntity
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_marked_for_deconstruction
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity is marked for upgrade with the upgrade planner or via script.
   *
   * Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_marked_for_upgrade Online documentation}
   */
  interface OnMarkedForUpgradeEvent extends EventData {
    readonly player_index?: PlayerIndex
    readonly entity: LuaEntity
    readonly target: LuaEntityPrototype
    /**
     * The target quality.
     */
    readonly quality: LuaQualityPrototype
    /**
     * Previous upgrade target of the entity, if entity was already marked for upgrade.
     */
    readonly previous_target?: LuaEntityPrototype
    /**
     * Previous upgrade target quality, if entity was already marked for upgrade.
     */
    readonly previous_quality?: LuaQualityPrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_marked_for_upgrade
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player purchases some offer from a `market` entity.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_market_item_purchased Online documentation}
   */
  interface OnMarketItemPurchasedEvent extends EventData {
    /**
     * The player who did the purchasing.
     */
    readonly player_index: PlayerIndex
    /**
     * The market entity.
     */
    readonly market: LuaEntity
    /**
     * The index of the offer purchased.
     */
    readonly offer_index: uint32
    /**
     * The amount of offers purchased.
     */
    readonly count: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_market_item_purchased
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_mod_item_opened Online documentation}
   */
  interface OnModItemOpenedEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * The item clicked on.
     */
    readonly item: LuaItemPrototype
    /**
     * The item quality clicked on.
     */
    readonly quality: LuaQualityPrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_mod_item_opened
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGameScript#is_multiplayer LuaGameScript::is_multiplayer} changes to true. May also be raised when it was already true but a game was loaded from a save file and with hosting.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_multiplayer_init Online documentation}
   */
  interface OnMultiplayerInitEvent extends EventData {
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_multiplayer_init
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after an object is destroyed which was registered with {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed} previously.
   *
   * Depending on when a given object is destroyed, this event will be fired at the end of the current tick or at the end of the next tick. The event's timing is independent of the in-world object being destroyed.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_object_destroyed Online documentation}
   */
  interface OnObjectDestroyedEvent extends EventData {
    /**
     * The number returned by {@link LuaBootstrap#register_on_object_destroyed register_on_object_destroyed} to uniquely identify this object during this event.
     */
    readonly registration_number: RegistrationNumber
    /**
     * The {@link RegistrationTarget useful identifier} of the object. Same as second value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}
     */
    readonly useful_id: uint64
    /**
     * Type of the object that was destroyed. Same as third value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}
     */
    readonly type: defines.target_type
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_object_destroyed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly after a permission group is added.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_permission_group_added Online documentation}
   */
  interface OnPermissionGroupAddedEvent extends EventData {
    /**
     * The player that added the group or `nil` if by a mod.
     */
    readonly player_index?: PlayerIndex
    /**
     * The group added.
     */
    readonly group: LuaPermissionGroup
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_permission_group_added
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly after a permission group is deleted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_permission_group_deleted Online documentation}
   */
  interface OnPermissionGroupDeletedEvent extends EventData {
    /**
     * The player doing the deletion or `nil` if by a mod.
     */
    readonly player_index?: PlayerIndex
    /**
     * The group that was deleted.
     */
    readonly group_name: string
    /**
     * The group id that was deleted.
     */
    readonly id: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_permission_group_deleted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly after a permission group is edited in some way.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_permission_group_edited Online documentation}
   */
  interface OnPermissionGroupEditedEvent extends EventData {
    /**
     * The player that did the editing or `nil` if by a mod.
     */
    readonly player_index?: PlayerIndex
    /**
     * The group being edited.
     */
    readonly group: LuaPermissionGroup
    /**
     * The edit type.
     */
    readonly type:
      | "add-permission"
      | "remove-permission"
      | "enable-all"
      | "disable-all"
      | "add-player"
      | "remove-player"
      | "rename"
    /**
     * The action when the `type` is `"add-permission"` or `"remove-permission"`.
     */
    readonly action: defines.input_action
    /**
     * The other player when the `type` is `"add-player"` or `"remove-player"`.
     */
    readonly other_player_index: uint32
    /**
     * The old group name when the `type` is `"rename"`.
     */
    readonly old_name: string
    /**
     * The new group name when the `type` is `"rename"`.
     */
    readonly new_name: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_permission_group_edited
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly after a permission string is imported.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_permission_string_imported Online documentation}
   */
  interface OnPermissionStringImportedEvent extends EventData {
    /**
     * The player that imported the string.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_permission_string_imported
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player picks up an item.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_picked_up_item Online documentation}
   */
  interface OnPickedUpItemEvent extends EventData {
    readonly item_stack: ItemWithQualityCount
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_picked_up_item
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player alt-reverse-selects an area with a selection-tool item.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_alt_reverse_selected_area Online documentation}
   */
  interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
    /**
     * The player doing the selection.
     */
    readonly player_index: PlayerIndex
    /**
     * The surface selected.
     */
    readonly surface: LuaSurface
    /**
     * The area selected.
     */
    readonly area: BoundingBox
    /**
     * The item used to select the area.
     */
    readonly item: string
    /**
     * The entities selected.
     */
    readonly entities: LuaEntity[]
    /**
     * The tiles selected.
     */
    readonly tiles: LuaTile[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_alt_reverse_selected_area
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player alt-selects an area with a selection-tool item.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_alt_selected_area Online documentation}
   */
  interface OnPlayerAltSelectedAreaEvent extends EventData {
    /**
     * The player doing the selection.
     */
    readonly player_index: PlayerIndex
    /**
     * The surface selected.
     */
    readonly surface: LuaSurface
    /**
     * The area selected.
     */
    readonly area: BoundingBox
    /**
     * The item used to select the area.
     */
    readonly item: string
    /**
     * The item quality used to select the area.
     */
    readonly quality: string
    /**
     * The entities selected.
     */
    readonly entities: LuaEntity[]
    /**
     * The tiles selected.
     */
    readonly tiles: LuaTile[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_alt_selected_area
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a players ammo inventory changed in some way.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_ammo_inventory_changed Online documentation}
   */
  interface OnPlayerAmmoInventoryChangedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_ammo_inventory_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a players armor inventory changed in some way.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_armor_inventory_changed Online documentation}
   */
  interface OnPlayerArmorInventoryChangedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_armor_inventory_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is banned.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_banned Online documentation}
   */
  interface OnPlayerBannedEvent extends EventData {
    /**
     * The player banned.
     */
    readonly player_index?: PlayerIndex
    /**
     * The banned player name.
     */
    readonly player_name: string
    /**
     * The player that did the banning if any.
     */
    readonly by_player?: PlayerIndex
    /**
     * The reason given if any.
     */
    readonly reason?: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_banned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player builds tiles.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_built_tile Online documentation}
   */
  interface OnPlayerBuiltTileEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The surface the tile(s) were built on.
     */
    readonly surface_index: SurfaceIndex
    /**
     * The position data.
     */
    readonly tiles: OldTileAndPosition[]
    /**
     * The tile prototype that was placed.
     */
    readonly tile: LuaTilePrototype
    /**
     * The item type used to build the tiles
     */
    readonly item?: LuaItemPrototype
    /**
     * The quality of the item used to build the tiles
     */
    readonly quality?: LuaQualityPrototype
    /**
     * The inventory containing the items used to build the tiles.
     */
    readonly inventory?: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_built_tile
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player cancels crafting.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_cancelled_crafting Online documentation}
   */
  interface OnPlayerCancelledCraftingEvent extends EventData {
    /**
     * The player that did the crafting.
     */
    readonly player_index: PlayerIndex
    /**
     * The crafting items returned to the player's inventory.
     */
    readonly items: LuaInventory
    /**
     * The recipe that has been cancelled.
     */
    readonly recipe: LuaRecipe
    /**
     * The number of crafts that have been cancelled.
     */
    readonly cancel_count: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_cancelled_crafting
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player changes forces.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_changed_force Online documentation}
   */
  interface OnPlayerChangedForceEvent extends EventData {
    /**
     * The player who changed forces.
     */
    readonly player_index: PlayerIndex
    /**
     * The old force.
     */
    readonly force: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_changed_force
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the tile position a player is located at changes.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_changed_position Online documentation}
   */
  interface OnPlayerChangedPositionEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_changed_position
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player changes surfaces.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_changed_surface Online documentation}
   */
  interface OnPlayerChangedSurfaceEvent extends EventData {
    /**
     * The player who changed surfaces.
     */
    readonly player_index: PlayerIndex
    /**
     * The surface index the player was on - may be `nil` if the surface no longer exists.
     */
    readonly surface_index?: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_changed_surface
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when cheat mode is disabled on a player.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_cheat_mode_disabled Online documentation}
   */
  interface OnPlayerCheatModeDisabledEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_cheat_mode_disabled
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when cheat mode is enabled on a player.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_cheat_mode_enabled Online documentation}
   */
  interface OnPlayerCheatModeEnabledEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_cheat_mode_enabled
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player clicks a gps tag
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_clicked_gps_tag Online documentation}
   */
  interface OnPlayerClickedGpsTagEvent extends EventData {
    /**
     * Index of the player
     */
    readonly player_index: PlayerIndex
    /**
     * Map position contained in gps tag
     */
    readonly position: MapPosition
    /**
     * Surface name contained in gps tag, even when such surface does not exists
     */
    readonly surface: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_clicked_gps_tag
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player clicks the "confirm" button in the configure Blueprint GUI.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_configured_blueprint Online documentation}
   */
  interface OnPlayerConfiguredBlueprintEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_configured_blueprint
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player changes controller types.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_controller_changed Online documentation}
   */
  interface OnPlayerControllerChangedEvent extends EventData {
    /**
     * The player who changed controllers.
     */
    readonly player_index: PlayerIndex
    /**
     * The old controller type.
     */
    readonly old_type: defines.controllers
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_controller_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player finishes crafting an item. This event fires just before the results are inserted into the player's inventory, not when the crafting is queued (see {@link OnPrePlayerCraftedItemEvent on_pre_player_crafted_item}).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_crafted_item Online documentation}
   */
  interface OnPlayerCraftedItemEvent extends EventData {
    /**
     * The item that has been crafted.
     */
    readonly item_stack: LuaItemStack
    /**
     * The player doing the crafting.
     */
    readonly player_index: PlayerIndex
    /**
     * The recipe used to craft this item.
     */
    readonly recipe: LuaRecipe
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_crafted_item
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the player was created.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_created Online documentation}
   */
  interface OnPlayerCreatedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
   *
   * This is fired in the same tick that the change happens, but not instantly.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_cursor_stack_changed Online documentation}
   */
  interface OnPlayerCursorStackChangedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_cursor_stack_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player selects an area with a deconstruction planner.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_deconstructed_area Online documentation}
   */
  interface OnPlayerDeconstructedAreaEvent extends EventData {
    /**
     * The player doing the selection.
     */
    readonly player_index: PlayerIndex
    /**
     * The surface selected.
     */
    readonly surface: LuaSurface
    /**
     * The area selected.
     */
    readonly area: BoundingBox
    /**
     * The item used to select the area.
     */
    readonly item: string
    /**
     * The item stack used to select the area.
     */
    readonly stack?: LuaItemStack
    /**
     * The record that was used to select the area.
     */
    readonly record?: LuaRecord
    /**
     * The item quality used to select the area.
     */
    readonly quality: string
    /**
     * If normal selection or alt selection was used.
     */
    readonly alt: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_deconstructed_area
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is demoted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_demoted Online documentation}
   */
  interface OnPlayerDemotedEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_demoted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player dies.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_died Online documentation}
   */
  interface OnPlayerDiedEvent extends EventData {
    readonly player_index: PlayerIndex
    readonly cause?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_died
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the display density scale changes for a given player. The display density scale is the scale value automatically applied based on the player's display DPI. This is only relevant on platforms that support high-density displays.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_display_density_scale_changed Online documentation}
   */
  interface OnPlayerDisplayDensityScaleChangedEvent extends EventData {
    /**
     * The player
     */
    readonly player_index: PlayerIndex
    /**
     * The old display scale
     */
    readonly old_scale: double
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_display_density_scale_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the display resolution changes for a given player.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_display_resolution_changed Online documentation}
   */
  interface OnPlayerDisplayResolutionChangedEvent extends EventData {
    /**
     * The player
     */
    readonly player_index: PlayerIndex
    /**
     * The old display resolution
     */
    readonly old_resolution: DisplayResolution
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_display_resolution_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the display scale changes for a given player.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_display_scale_changed Online documentation}
   */
  interface OnPlayerDisplayScaleChangedEvent extends EventData {
    /**
     * The player
     */
    readonly player_index: PlayerIndex
    /**
     * The old display scale
     */
    readonly old_scale: double
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_display_scale_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
   *
   * This event is not raised when the player is ejected from a vehicle due to it being destroyed.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_driving_changed_state Online documentation}
   */
  interface OnPlayerDrivingChangedStateEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The vehicle if any.
     */
    readonly entity?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_driving_changed_state
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player drops an item on the ground.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_dropped_item Online documentation}
   */
  interface OnPlayerDroppedItemEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The item-on-ground entity.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_dropped_item
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player drops a single item into an entity.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_dropped_item_into_entity Online documentation}
   */
  interface OnPlayerDroppedItemIntoEntityEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The entity the item was dropped into.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_dropped_item_into_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player fast-transfers something to or from an entity.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_fast_transferred Online documentation}
   */
  interface OnPlayerFastTransferredEvent extends EventData {
    /**
     * The player transferred from or to.
     */
    readonly player_index: PlayerIndex
    /**
     * The entity transferred from or to.
     */
    readonly entity: LuaEntity
    /**
     * Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
     */
    readonly from_player: boolean
    /**
     * Whether the transfer was a split action (half stack).
     */
    readonly is_split: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_fast_transferred
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player flips an entity. This event is only fired when the entity actually changes its orientation or mirroring, so it won't be triggered when pressing the flip keys on an entity that can't be flipped.
   *
   * This event reflects a change in the {@link LuaEntity#mirroring LuaEntity::mirroring} property.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_flipped_entity Online documentation}
   */
  interface OnPlayerFlippedEntityEvent extends EventData {
    /**
     * The flipped entity.
     */
    readonly entity: LuaEntity
    /**
     * The enacted flip. `true` means a horizontal flip, `false` a vertical one.
     */
    readonly horizontal: boolean
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_flipped_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after player flushed fluid
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_flushed_fluid Online documentation}
   */
  interface OnPlayerFlushedFluidEvent extends EventData {
    /**
     * Index of the player
     */
    readonly player_index: PlayerIndex
    /**
     * Name of a fluid that was flushed
     */
    readonly fluid: string
    /**
     * Amount of fluid that was removed
     */
    readonly amount: double
    /**
     * Entity from which flush was performed
     */
    readonly entity: LuaEntity
    /**
     * True if flush was requested only on this entity
     */
    readonly only_this_entity: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_flushed_fluid
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a players gun inventory changed in some way.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_gun_inventory_changed Online documentation}
   */
  interface OnPlayerGunInventoryChangedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_gun_inventory_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_input_method_changed Online documentation}
   */
  interface OnPlayerInputMethodChangedEvent extends EventData {
    /**
     * The player whose input method changed.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_input_method_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_joined_game Online documentation}
   */
  interface OnPlayerJoinedGameEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_joined_game
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is kicked.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_kicked Online documentation}
   */
  interface OnPlayerKickedEvent extends EventData {
    /**
     * The player kicked.
     */
    readonly player_index: PlayerIndex
    /**
     * The player that did the kicking if any.
     */
    readonly by_player?: PlayerIndex
    /**
     * The reason given if any.
     */
    readonly reason?: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_kicked
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player leaves the game. This is not called when closing a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_left_game Online documentation}
   */
  interface OnPlayerLeftGameEvent extends EventData {
    readonly player_index: PlayerIndex
    readonly reason: defines.disconnect_reason
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_left_game
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player's active locale changes. See {@link LuaPlayer#locale LuaPlayer::locale}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_locale_changed Online documentation}
   */
  interface OnPlayerLocaleChangedEvent extends EventData {
    /**
     * The player whose locale was changed.
     */
    readonly player_index: PlayerIndex
    /**
     * The previously active locale.
     */
    readonly old_locale: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_locale_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a players main inventory changed in some way.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_main_inventory_changed Online documentation}
   */
  interface OnPlayerMainInventoryChangedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_main_inventory_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the results of an entity being mined are collected just before the entity is destroyed.
   *
   * After this event any items in the buffer will be transferred into the player as if they came from mining the entity.
   *
   * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
   *
   * Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_mined_entity Online documentation}
   */
  interface OnPlayerMinedEntityEvent extends EventData {
    /**
     * The index of the player doing the mining.
     */
    readonly player_index: PlayerIndex
    /**
     * The entity that has been mined.
     */
    readonly entity: LuaEntity
    /**
     * The temporary inventory that holds the result of mining the entity.
     */
    readonly buffer: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_mined_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player mines something.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_mined_item Online documentation}
   */
  interface OnPlayerMinedItemEvent extends EventData {
    /**
     * The item given to the player
     */
    readonly item_stack: ItemWithQualityCount
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_mined_item
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player mines tiles.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_mined_tile Online documentation}
   */
  interface OnPlayerMinedTileEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The surface the tile(s) were mined from.
     */
    readonly surface_index: SurfaceIndex
    /**
     * The position data.
     */
    readonly tiles: OldTileAndPosition[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_mined_tile
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is muted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_muted Online documentation}
   */
  interface OnPlayerMutedEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_muted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player invokes the "smart pipette" over an entity.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_pipette Online documentation}
   */
  interface OnPlayerPipetteEvent extends EventData {
    /**
     * The player
     */
    readonly player_index: PlayerIndex
    /**
     * The item put in the cursor
     */
    readonly item: LuaItemPrototype
    /**
     * The item quality put in the cursor
     */
    readonly quality: LuaQualityPrototype
    /**
     * If cheat mode was used to give a free stack of the item.
     */
    readonly used_cheat_mode: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_pipette
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the player puts equipment in an equipment grid
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_placed_equipment Online documentation}
   */
  interface OnPlayerPlacedEquipmentEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The equipment put in the equipment grid.
     */
    readonly equipment: LuaEquipment
    /**
     * The equipment grid the equipment was put in.
     */
    readonly grid: LuaEquipmentGrid
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_placed_equipment
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is promoted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_promoted Online documentation}
   */
  interface OnPlayerPromotedEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_promoted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_removed Online documentation}
   */
  interface OnPlayerRemovedEvent extends EventData {
    /**
     * The index of the removed player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_removed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the player removes equipment from an equipment grid
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_removed_equipment Online documentation}
   */
  interface OnPlayerRemovedEquipmentEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The equipment grid removed from.
     */
    readonly grid: LuaEquipmentGrid
    /**
     * The equipment removed.
     */
    readonly equipment: string
    /**
     * The equipment quality.
     */
    readonly quality: string
    /**
     * The count of equipment removed.
     */
    readonly count: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_removed_equipment
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player repairs an entity.
   *
   * Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_repaired_entity Online documentation}
   */
  interface OnPlayerRepairedEntityEvent extends EventData {
    readonly player_index: PlayerIndex
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_repaired_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player respawns.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_respawned Online documentation}
   */
  interface OnPlayerRespawnedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The player port used to respawn if one was used.
     */
    readonly player_port?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_respawned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player reverse-selects an area with a selection-tool item.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_reverse_selected_area Online documentation}
   */
  interface OnPlayerReverseSelectedAreaEvent extends EventData {
    /**
     * The player doing the selection.
     */
    readonly player_index: PlayerIndex
    /**
     * The surface selected.
     */
    readonly surface: LuaSurface
    /**
     * The area selected.
     */
    readonly area: BoundingBox
    /**
     * The item used to select the area.
     */
    readonly item: string
    /**
     * The entities selected.
     */
    readonly entities: LuaEntity[]
    /**
     * The tiles selected.
     */
    readonly tiles: LuaTile[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_reverse_selected_area
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.
   *
   * Entities being flipped will not fire this event, even if the flip involves rotating. See {@link OnPlayerFlippedEntityEvent on_player_flipped_entity}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_rotated_entity Online documentation}
   */
  interface OnPlayerRotatedEntityEvent extends EventData {
    /**
     * The rotated entity.
     */
    readonly entity: LuaEntity
    /**
     * The previous direction
     */
    readonly previous_direction: defines.direction
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_rotated_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a player selects an area with a selection-tool item.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_selected_area Online documentation}
   */
  interface OnPlayerSelectedAreaEvent extends EventData {
    /**
     * The player doing the selection.
     */
    readonly player_index: PlayerIndex
    /**
     * The surface selected.
     */
    readonly surface: LuaSurface
    /**
     * The area selected.
     */
    readonly area: BoundingBox
    /**
     * The item used to select the area.
     */
    readonly item: string
    /**
     * The item quality used to select the area.
     */
    readonly quality: string
    /**
     * The entities selected.
     */
    readonly entities: LuaEntity[]
    /**
     * The tiles selected.
     */
    readonly tiles: LuaTile[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_selected_area
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player sets a quickbar slot to anything (new value, or set to empty).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_set_quick_bar_slot Online documentation}
   */
  interface OnPlayerSetQuickBarSlotEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_set_quick_bar_slot
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player selects an area with a blueprint.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_setup_blueprint Online documentation}
   */
  interface OnPlayerSetupBlueprintEvent extends EventData {
    /**
     * The player doing the selection.
     */
    readonly player_index: PlayerIndex
    /**
     * The surface selected.
     */
    readonly surface: LuaSurface
    /**
     * The area selected.
     */
    readonly area: BoundingBox
    /**
     * The item used to select the area.
     */
    readonly item: string
    /**
     * The item stack used to select the area.
     */
    readonly stack?: LuaItemStack
    /**
     * The record that is being reassigned.
     */
    readonly record?: LuaRecord
    /**
     * The item quality used to select the area.
     */
    readonly quality: string
    /**
     * If normal selection or alt selection was used.
     */
    readonly alt: boolean
    /**
     * The blueprint entity index to source entity mapping. Note: if any mod changes the blueprint this will be incorrect.
     */
    readonly mapping: LuaLazyLoadedValue<Record<uint32, LuaEntity>>
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_setup_blueprint
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player toggles alt mode, also known as "show entity info".
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_toggled_alt_mode Online documentation}
   */
  interface OnPlayerToggledAltModeEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The new alt mode value. This value is a shortcut for accessing {@link GameViewSettings#show_entity_info GameViewSettings::show_entity_info} on the player.
     */
    readonly alt_mode: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_toggled_alt_mode
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player toggles the map editor on or off.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_toggled_map_editor Online documentation}
   */
  interface OnPlayerToggledMapEditorEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_toggled_map_editor
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a players trash inventory changed in some way.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_trash_inventory_changed Online documentation}
   */
  interface OnPlayerTrashInventoryChangedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_trash_inventory_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is un-banned.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_unbanned Online documentation}
   */
  interface OnPlayerUnbannedEvent extends EventData {
    /**
     * The player un-banned.
     */
    readonly player_index?: PlayerIndex
    /**
     * The player name un-banned.
     */
    readonly player_name: string
    /**
     * The player that did the un-banning if any.
     */
    readonly by_player?: PlayerIndex
    /**
     * The reason the player was banned if any.
     */
    readonly reason?: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_unbanned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player is unmuted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_unmuted Online documentation}
   */
  interface OnPlayerUnmutedEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_unmuted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player uses a capsule that results in some game action.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_used_capsule Online documentation}
   */
  interface OnPlayerUsedCapsuleEvent extends EventData {
    /**
     * The player.
     */
    readonly player_index: PlayerIndex
    /**
     * The capsule item used.
     */
    readonly item: LuaItemPrototype
    /**
     * The quality of the capsule item used.
     */
    readonly quality: LuaQualityPrototype
    /**
     * The position the capsule was used.
     */
    readonly position: MapPosition
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_used_capsule
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player uses spidertron remote to send all selected units to a given position
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_player_used_spidertron_remote Online documentation}
   */
  interface OnPlayerUsedSpidertronRemoteEvent extends EventData {
    /**
     * The player that used the remote.
     */
    readonly player_index: PlayerIndex
    /**
     * Goal position to which spidertron was sent to.
     */
    readonly position: MapPosition
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_player_used_spidertron_remote
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after an entity dies.
   *
   * Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_post_entity_died Online documentation}
   */
  interface OnPostEntityDiedEvent extends EventData {
    /**
     * The ghost created by the entity dying if any.
     */
    readonly ghost?: LuaEntity
    /**
     * The force that did the killing if any.
     */
    readonly force?: LuaForce
    /**
     * Position where the entity died.
     */
    readonly position: MapPosition
    /**
     * The entity prototype of the entity that died.
     */
    readonly prototype: LuaEntityPrototype
    /**
     * The quality of the entity that died.
     */
    readonly quality: LuaQualityPrototype
    /**
     * The damage type if any.
     */
    readonly damage_type?: LuaDamagePrototype
    /**
     * The corpses created by the entity dying if any.
     */
    readonly corpses: LuaEntity[]
    /**
     * The surface the entity was on.
     */
    readonly surface_index: SurfaceIndex
    /**
     * The unit number the entity had if any.
     */
    readonly unit_number?: UnitNumber
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_post_entity_died
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a segmented unit dies.
   *
   * Event filter: [LuaPostSegmentedUnitDiedEventFilter](LuaPostSegmentedUnitDiedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_post_segmented_unit_died Online documentation}
   */
  interface OnPostSegmentedUnitDiedEvent extends EventData {
    /**
     * The force that did the killing if any.
     */
    readonly force?: LuaForce
    /**
     * Information about each of the unit's individual segments when it died.
     */
    readonly segments: PostSegmentDiedData
    /**
     * The prototype of the unit that died.
     */
    readonly prototype: LuaEntityPrototype
    /**
     * The quality of the unit that died.
     */
    readonly quality: LuaQualityPrototype
    /**
     * The damage type that did the killing if any.
     */
    readonly damage_type?: LuaDamagePrototype
    /**
     * The surface the entity was on.
     */
    readonly surface_index: SurfaceIndex
    /**
     * The unit number of the unit that died.
     */
    readonly unit_number: UnitNumber
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_post_segmented_unit_died
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_build Online documentation}
   */
  interface OnPreBuildEvent extends EventData {
    /**
     * The player who did the placing.
     */
    readonly player_index: PlayerIndex
    /**
     * Where the item was placed.
     */
    readonly position: MapPosition
    /**
     * Build mode the item was placed with.
     */
    readonly build_mode: defines.build_mode
    /**
     * The direction the item was facing when placed.
     */
    readonly direction: defines.direction
    /**
     * If the item is mirrored (only crafting machines support this)
     */
    readonly mirror: boolean
    /**
     * Whether the blueprint was flipped horizontally. `nil` if not built by a blueprint.
     */
    readonly flip_horizontal: boolean | nil
    /**
     * Whether the blueprint was flipped vertically. `nil` if not built by a blueprint.
     */
    readonly flip_vertical: boolean | nil
    /**
     * Whether the item was placed while moving.
     */
    readonly created_by_moving: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_build
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_chunk_deleted Online documentation}
   */
  interface OnPreChunkDeletedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * The chunks to be deleted.
     */
    readonly positions: ChunkPosition[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_chunk_deleted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before entity copy-paste is done.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_entity_settings_pasted Online documentation}
   */
  interface OnPreEntitySettingsPastedEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * The source entity settings will be copied from.
     */
    readonly source: LuaEntity
    /**
     * The destination entity settings will be copied to.
     */
    readonly destination: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_entity_settings_pasted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a ghost entity is destroyed as a result of being marked for deconstruction.
   *
   * Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
   *
   * Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_ghost_deconstructed Online documentation}
   */
  interface OnPreGhostDeconstructedEvent extends EventData {
    /**
     * The player that did the deconstruction if any.
     */
    readonly player_index?: PlayerIndex
    readonly ghost: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_ghost_deconstructed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a ghost entity is upgraded.
   *
   * Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_ghost_upgraded Online documentation}
   */
  interface OnPreGhostUpgradedEvent extends EventData {
    /**
     * The player that did the upgrade if any.
     */
    readonly player_index?: PlayerIndex
    readonly ghost: LuaEntity
    readonly target: LuaEntityPrototype
    readonly quality: LuaQualityPrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_ghost_upgraded
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly before a permission group is deleted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_permission_group_deleted Online documentation}
   */
  interface OnPrePermissionGroupDeletedEvent extends EventData {
    /**
     * The player doing the deletion or `nil` if by a mod.
     */
    readonly player_index?: PlayerIndex
    /**
     * The group to be deleted.
     */
    readonly group: LuaPermissionGroup
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_permission_group_deleted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly before a permission string is imported.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_permission_string_imported Online documentation}
   */
  interface OnPrePermissionStringImportedEvent extends EventData {
    /**
     * The player importing the string.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_permission_string_imported
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a player queues something to be crafted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_player_crafted_item Online documentation}
   */
  interface OnPrePlayerCraftedItemEvent extends EventData {
    /**
     * The player doing the crafting.
     */
    readonly player_index: PlayerIndex
    /**
     * The recipe being queued.
     */
    readonly recipe: LuaRecipe
    /**
     * The items removed from the players inventory to do the crafting.
     */
    readonly items: LuaInventory
    /**
     * The number of times the recipe is being queued.
     */
    readonly queued_count: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_player_crafted_item
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a players dies.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_player_died Online documentation}
   */
  interface OnPrePlayerDiedEvent extends EventData {
    readonly player_index: PlayerIndex
    readonly cause?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_player_died
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a player leaves the game.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_player_left_game Online documentation}
   */
  interface OnPrePlayerLeftGameEvent extends EventData {
    readonly player_index: PlayerIndex
    readonly reason: defines.disconnect_reason
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_player_left_game
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed.
   *
   * Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_player_mined_item Online documentation}
   */
  interface OnPrePlayerMinedItemEvent extends EventData {
    /**
     * The entity being mined
     */
    readonly entity: LuaEntity
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_player_mined_item
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_player_removed Online documentation}
   */
  interface OnPrePlayerRemovedEvent extends EventData {
    /**
     * The index of the removed player.
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_player_removed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a player toggles the map editor on or off.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_player_toggled_map_editor Online documentation}
   */
  interface OnPrePlayerToggledMapEditorEvent extends EventData {
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_player_toggled_map_editor
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly before a robot explodes cliffs.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_robot_exploded_cliff Online documentation}
   */
  interface OnPreRobotExplodedCliffEvent extends EventData {
    readonly robot: LuaEntity
    readonly cliff: LuaEntity
    /**
     * The cliff explosive used.
     */
    readonly item: LuaItemPrototype
    /**
     * The quality of the cliff explosive used.
     */
    readonly quality: LuaQualityPrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_robot_exploded_cliff
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called just before the scenario finishes.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_scenario_finished Online documentation}
   */
  interface OnPreScenarioFinishedEvent extends EventData {
    /**
     * If a player won
     */
    readonly player_won: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_scenario_finished
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called just before a script inventory is resized.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_script_inventory_resized Online documentation}
   */
  interface OnPreScriptInventoryResizedEvent extends EventData {
    /**
     * If done by console command; the player who ran the command.
     */
    readonly player_index?: PlayerIndex
    /**
     * The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
     */
    readonly mod: string
    readonly inventory: LuaInventory
    /**
     * The old inventory size.
     */
    readonly old_size: uint32
    /**
     * The new inventory size.
     */
    readonly new_size: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_script_inventory_resized
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called just before a surface is cleared (all entities removed and all chunks deleted).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_surface_cleared Online documentation}
   */
  interface OnPreSurfaceClearedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_surface_cleared
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called just before a surface is deleted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_pre_surface_deleted Online documentation}
   */
  interface OnPreSurfaceDeletedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_pre_surface_deleted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player triggers "redo".
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_redo_applied Online documentation}
   */
  interface OnRedoAppliedEvent extends EventData {
    /**
     * The player who triggered the redo action.
     */
    readonly player_index: PlayerIndex
    /**
     * The context of the redo action.
     */
    readonly actions: UndoRedoAction[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_redo_applied
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when research is cancelled.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_research_cancelled Online documentation}
   */
  interface OnResearchCancelledEvent extends EventData {
    /**
     * A mapping of technology name to how many times it was cancelled.
     */
    readonly research: Record<string, uint32>
    /**
     * The force whose research was cancelled.
     */
    readonly force: LuaForce
    /**
     * The player who cancelled the research if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_research_cancelled
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a research finishes.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_research_finished Online documentation}
   */
  interface OnResearchFinishedEvent extends EventData {
    /**
     * The researched technology
     */
    readonly research: LuaTechnology
    /**
     * If the technology was researched by script.
     */
    readonly by_script: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_research_finished
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when research is moved forwards or backwards in the research queue.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_research_moved Online documentation}
   */
  interface OnResearchMovedEvent extends EventData {
    /**
     * The force whose research was re-arranged.
     */
    readonly force: LuaForce
    /**
     * The player who did the re-arranging if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_research_moved
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when research is queued.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_research_queued Online documentation}
   */
  interface OnResearchQueuedEvent extends EventData {
    /**
     * The technology queued
     */
    readonly research: LuaTechnology
    /**
     * The force whose research was queued.
     */
    readonly force: LuaForce
    /**
     * The player who queued the research if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_research_queued
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a research is reversed (unresearched).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_research_reversed Online documentation}
   */
  interface OnResearchReversedEvent extends EventData {
    /**
     * The technology un-researched
     */
    readonly research: LuaTechnology
    /**
     * If the technology was un-researched by script.
     */
    readonly by_script: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_research_reversed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a technology research starts.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_research_started Online documentation}
   */
  interface OnResearchStartedEvent extends EventData {
    /**
     * The technology being researched
     */
    readonly research: LuaTechnology
    readonly last_research?: LuaTechnology
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_research_started
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a resource entity reaches 0 or its minimum yield for infinite resources.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_resource_depleted Online documentation}
   */
  interface OnResourceDepletedEvent extends EventData {
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_resource_depleted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a construction robot builds an entity.
   *
   * Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_robot_built_entity Online documentation}
   */
  interface OnRobotBuiltEntityEvent extends EventData {
    /**
     * The robot that did the building.
     */
    readonly robot: LuaEntity
    /**
     * The entity built.
     */
    readonly entity: LuaEntity
    /**
     * The item used to do the building.
     */
    readonly stack: LuaItemStack
    /**
     * The tags associated with this entity if any.
     */
    readonly tags?: Tags
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_robot_built_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a robot builds tiles.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_robot_built_tile Online documentation}
   */
  interface OnRobotBuiltTileEvent extends EventData {
    /**
     * The robot.
     */
    readonly robot: LuaEntity
    /**
     * The position data.
     */
    readonly tiles: OldTileAndPosition[]
    /**
     * The tile prototype that was placed.
     */
    readonly tile: LuaTilePrototype
    /**
     * The item type used to build the tiles.
     */
    readonly item: LuaItemPrototype
    /**
     * The quality the item used to build the tiles.
     */
    readonly quality: LuaQualityPrototype
    /**
     * The inventory containing the stacks used to build the tiles.
     */
    readonly inventory: LuaInventory
    /**
     * The surface the tile(s) are build on.
     */
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_robot_built_tile
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called directly after a robot explodes cliffs.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_robot_exploded_cliff Online documentation}
   */
  interface OnRobotExplodedCliffEvent extends EventData {
    readonly robot: LuaEntity
    /**
     * The cliff explosive used.
     */
    readonly item: LuaItemPrototype
    /**
     * The quality of the cliff explosive used.
     */
    readonly quality: LuaQualityPrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_robot_exploded_cliff
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a robot mines an entity.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_robot_mined Online documentation}
   */
  interface OnRobotMinedEvent extends EventData {
    /**
     * The robot that did the mining.
     */
    readonly robot: LuaEntity
    /**
     * The entity the robot just picked up.
     */
    readonly item_stack: ItemWithQualityCount
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_robot_mined
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the results of an entity being mined are collected just before the entity is destroyed.
   *
   * After this event any items in the buffer will be transferred into the robot as if they came from mining the entity.
   *
   * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
   *
   * Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_robot_mined_entity Online documentation}
   */
  interface OnRobotMinedEntityEvent extends EventData {
    /**
     * The robot doing the mining.
     */
    readonly robot: LuaEntity
    /**
     * The entity that has been mined.
     */
    readonly entity: LuaEntity
    /**
     * The temporary inventory that holds the result of mining the entity.
     */
    readonly buffer: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_robot_mined_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a robot mines tiles.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_robot_mined_tile Online documentation}
   */
  interface OnRobotMinedTileEvent extends EventData {
    /**
     * The robot.
     */
    readonly robot: LuaEntity
    /**
     * The position data.
     */
    readonly tiles: OldTileAndPosition[]
    /**
     * The surface the tile(s) were mined on.
     */
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_robot_mined_tile
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a robot mines an entity.
   *
   * Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_robot_pre_mined Online documentation}
   */
  interface OnRobotPreMinedEvent extends EventData {
    /**
     * The robot that's about to do the mining.
     */
    readonly robot: LuaEntity
    /**
     * The entity which is about to be mined.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_robot_pre_mined
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a rocket silo is ordered to be launched.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_rocket_launch_ordered Online documentation}
   */
  interface OnRocketLaunchOrderedEvent extends EventData {
    readonly rocket: LuaEntity
    readonly rocket_silo: LuaEntity
    /**
     * The player that is riding the rocket, if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_rocket_launch_ordered
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a rocket finishes ascending. (Triggers listening for finished rocket launch past 2.0 have been moved to 'on_cargo_pod_finished_ascending' as rocket and cargo pod are two separate entities)
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_rocket_launched Online documentation}
   */
  interface OnRocketLaunchedEvent extends EventData {
    readonly rocket: LuaEntity
    readonly rocket_silo?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_rocket_launched
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a runtime mod setting is changed by a player.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_runtime_mod_setting_changed Online documentation}
   */
  interface OnRuntimeModSettingChangedEvent extends EventData {
    /**
     * If the `setting_type` is `"global"` and it was changed through the mod settings GUI, this is the index of the player that changed the global setting. If the `setting_type` is `"runtime-per-user"` and it changed a current setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`.
     */
    readonly player_index?: PlayerIndex
    /**
     * The prototype name of the setting that was changed.
     */
    readonly setting: string
    readonly setting_type: "runtime-global" | "runtime-per-user"
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_runtime_mod_setting_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called just after a script inventory is resized.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_script_inventory_resized Online documentation}
   */
  interface OnScriptInventoryResizedEvent extends EventData {
    /**
     * If done by console command; the player who ran the command.
     */
    readonly player_index?: PlayerIndex
    /**
     * The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
     */
    readonly mod: string
    readonly inventory: LuaInventory
    /**
     * The old inventory size.
     */
    readonly old_size: uint32
    /**
     * The new inventory size.
     */
    readonly new_size: uint32
    /**
     * Any items which didn't fit into the new inventory size.
     */
    readonly overflow_inventory: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_script_inventory_resized
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_script_path_request_finished Online documentation}
   */
  interface OnScriptPathRequestFinishedEvent extends EventData {
    /**
     * The actual path that the pathfinder has determined. `nil` if pathfinding failed.
     */
    readonly path?: PathfinderWaypoint[]
    /**
     * Handle to associate the callback with a particular call to {@link LuaSurface#request_path LuaSurface::request_path}.
     */
    readonly id: uint32
    /**
     * Indicates that the pathfinder failed because it is too busy, and that you can retry later.
     */
    readonly try_again_later: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_script_path_request_finished
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a script trigger effect is triggered.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_script_trigger_effect Online documentation}
   */
  interface OnScriptTriggerEffectEvent extends EventData {
    /**
     * The effect_id specified in the trigger effect.
     */
    readonly effect_id: string
    /**
     * The surface the effect happened on.
     */
    readonly surface_index: SurfaceIndex
    readonly source_position?: MapPosition
    readonly source_entity?: LuaEntity
    readonly target_position?: MapPosition
    readonly target_entity?: LuaEntity
    /**
     * The entity that originally caused the sequence of triggers
     */
    readonly cause_entity?: LuaEntity
    readonly quality?: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_script_trigger_effect
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity of type `radar` finishes scanning a sector.
   *
   * Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_sector_scanned Online documentation}
   */
  interface OnSectorScannedEvent extends EventData {
    /**
     * The radar that did the scanning.
     */
    readonly radar: LuaEntity
    /**
     * The chunk scanned.
     */
    readonly chunk_position: ChunkPosition
    /**
     * Area of the scanned chunk.
     */
    readonly area: BoundingBox
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_sector_scanned
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an individual segment of a SegmentedUnit is created.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_segment_entity_created Online documentation}
   */
  interface OnSegmentEntityCreatedEvent extends EventData {
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_segment_entity_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a segmented unit is created for any reason.
   *
   * Event filter: [LuaSegmentedUnitCreatedEventFilter](LuaSegmentedUnitCreatedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_segmented_unit_created Online documentation}
   */
  interface OnSegmentedUnitCreatedEvent extends EventData {
    /**
     * The reason that the segmented unit was created.
     */
    readonly cause: defines.segmented_unit_created_cause
    /**
     * The segmented unit that was created.
     */
    readonly segmented_unit: LuaSegmentedUnit
    /**
     * If the new segmented unit was cloned, the segmented unit from which the new unit was cloned.
     */
    readonly clone_source?: LuaSegmentedUnit
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_segmented_unit_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
   *
   * Event filter: [LuaSegmentedUnitDamagedEventFilter](LuaSegmentedUnitDamagedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_segmented_unit_damaged Online documentation}
   */
  interface OnSegmentedUnitDamagedEvent extends EventData {
    readonly segmented_unit: LuaSegmentedUnit
    readonly damage_type: LuaDamagePrototype
    /**
     * The damage amount before resistances.
     */
    readonly original_damage_amount: float
    /**
     * The damage amount after resistances.
     */
    readonly final_damage_amount: float
    /**
     * The health of the unit after the damage was applied.
     */
    readonly final_health: float
    /**
     * The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).
     */
    readonly cause?: LuaEntity
    /**
     * The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).
     */
    readonly source?: LuaEntity
    /**
     * The force that did the attacking.
     */
    readonly force?: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_segmented_unit_damaged
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a segmented unit dies.
   *
   * Event filter: [LuaSegmentedUnitDiedEventFilter](LuaSegmentedUnitDiedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_segmented_unit_died Online documentation}
   */
  interface OnSegmentedUnitDiedEvent extends EventData {
    /**
     * The unit that died.
     */
    readonly segmented_unit: LuaSegmentedUnit
    /**
     * The entity that did the killing if available.
     */
    readonly cause?: LuaEntity
    /**
     * The force that did the killing if any.
     */
    readonly force?: LuaForce
    /**
     * The damage type if any.
     */
    readonly damage_type?: LuaDamagePrototype
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_segmented_unit_died
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the selected entity changes for a given player.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_selected_entity_changed Online documentation}
   */
  interface OnSelectedEntityChangedEvent extends EventData {
    /**
     * The player whose selected entity changed.
     */
    readonly player_index: PlayerIndex
    /**
     * The last selected entity if it still exists and there was one.
     */
    readonly last_entity?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_selected_entity_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaGameScript#is_multiplayer LuaGameScript::is_multiplayer} changes to false. May also be raised when it was already false but a game was loaded from a save file without hosting.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_singleplayer_init Online documentation}
   */
  interface OnSingleplayerInitEvent extends EventData {
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_singleplayer_init
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a space platform builds an entity.
   *
   * Event filter: [LuaPlatformBuiltEntityEventFilter](LuaPlatformBuiltEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_space_platform_built_entity Online documentation}
   */
  interface OnSpacePlatformBuiltEntityEvent extends EventData {
    /**
     * The platform that did the building.
     */
    readonly platform: LuaSpacePlatform
    /**
     * The entity built.
     */
    readonly entity: LuaEntity
    /**
     * The item used to do the building.
     */
    readonly stack: LuaItemStack
    /**
     * The tags associated with this entity if any.
     */
    readonly tags?: Tags
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_space_platform_built_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a space platform builds tiles.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_space_platform_built_tile Online documentation}
   */
  interface OnSpacePlatformBuiltTileEvent extends EventData {
    /**
     * The platform.
     */
    readonly platform: LuaSpacePlatform
    /**
     * The position data.
     */
    readonly tiles: OldTileAndPosition[]
    /**
     * The tile prototype that was placed.
     */
    readonly tile: LuaTilePrototype
    /**
     * The item type used to build the tiles.
     */
    readonly item: LuaItemPrototype
    /**
     * The quality the item used to build the tiles.
     */
    readonly quality: LuaQualityPrototype
    /**
     * The inventory containing the stacks used to build the tiles.
     */
    readonly inventory: LuaInventory
    /**
     * The surface the tile(s) are build on.
     */
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_space_platform_built_tile
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a space platform changes state
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_space_platform_changed_state Online documentation}
   */
  interface OnSpacePlatformChangedStateEvent extends EventData {
    readonly platform: LuaSpacePlatform
    readonly old_state: defines.space_platform_state
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_space_platform_changed_state
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the results of an entity being mined are collected just before the entity is destroyed.
   *
   * After this event any items in the buffer will be transferred into the platform as if they came from mining the entity.
   *
   * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
   *
   * Event filter: [LuaPlatformMinedEntityEventFilter](LuaPlatformMinedEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_space_platform_mined_entity Online documentation}
   */
  interface OnSpacePlatformMinedEntityEvent extends EventData {
    /**
     * The platform doing the mining.
     */
    readonly platform: LuaSpacePlatform
    /**
     * The entity that has been mined.
     */
    readonly entity: LuaEntity
    /**
     * The temporary inventory that holds the result of mining the entity.
     */
    readonly buffer: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_space_platform_mined_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a platform mines an entity.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_space_platform_mined_item Online documentation}
   */
  interface OnSpacePlatformMinedItemEvent extends EventData {
    /**
     * The platform that did the mining.
     */
    readonly platform: LuaSpacePlatform
    /**
     * The entity the platform just picked up.
     */
    readonly item_stack: ItemWithQualityCount
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_space_platform_mined_item
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a platform mines tiles.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_space_platform_mined_tile Online documentation}
   */
  interface OnSpacePlatformMinedTileEvent extends EventData {
    /**
     * The platform.
     */
    readonly platform: LuaSpacePlatform
    /**
     * The position data.
     */
    readonly tiles: OldTileAndPosition[]
    /**
     * The surface the tile(s) were mined on.
     */
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_space_platform_mined_tile
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before a platform mines an entity.
   *
   * Event filter: [LuaPrePlatformMinedEntityEventFilter](LuaPrePlatformMinedEntityEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_space_platform_pre_mined Online documentation}
   */
  interface OnSpacePlatformPreMinedEvent extends EventData {
    /**
     * The platform that's about to do the mining.
     */
    readonly platform: LuaSpacePlatform
    /**
     * The entity which is about to be mined.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_space_platform_pre_mined
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a spider finishes moving to its autopilot position.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_spider_command_completed Online documentation}
   */
  interface OnSpiderCommandCompletedEvent extends EventData {
    /**
     * Spider vehicle which was requested to move.
     */
    readonly vehicle: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_spider_command_completed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a translation request generated through {@link LuaPlayer#request_translation LuaPlayer::request_translation} or {@link LuaPlayer#request_translations LuaPlayer::request_translations} has been completed.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_string_translated Online documentation}
   */
  interface OnStringTranslatedEvent extends EventData {
    /**
     * The player whose locale was used for the translation.
     */
    readonly player_index: PlayerIndex
    /**
     * The localised string being translated.
     */
    readonly localised_string: LocalisedString
    /**
     * The translated `localised_string`.
     */
    readonly result: string
    /**
     * The unique id for this translation request.
     */
    readonly id: uint32
    /**
     * Whether the requested localised string was valid and could be translated.
     */
    readonly translated: boolean
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_string_translated
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called just after a surface is cleared (all entities removed and all chunks deleted).
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_surface_cleared Online documentation}
   */
  interface OnSurfaceClearedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_surface_cleared
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a surface is created.
   *
   * This is not called when the default surface is created as it will always exist.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_surface_created Online documentation}
   */
  interface OnSurfaceCreatedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_surface_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a surface is deleted.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_surface_deleted Online documentation}
   */
  interface OnSurfaceDeletedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_surface_deleted
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after a surface is imported via the map editor.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_surface_imported Online documentation}
   */
  interface OnSurfaceImportedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    /**
     * The original surface name.
     */
    readonly original_name: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_surface_imported
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a surface is renamed.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_surface_renamed Online documentation}
   */
  interface OnSurfaceRenamedEvent extends EventData {
    readonly surface_index: SurfaceIndex
    readonly old_name: string
    readonly new_name: string
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_surface_renamed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_technology_effects_reset Online documentation}
   */
  interface OnTechnologyEffectsResetEvent extends EventData {
    readonly force: LuaForce
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_technology_effects_reset
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a territory is created for any reason.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_territory_created Online documentation}
   */
  interface OnTerritoryCreatedEvent extends EventData {
    /**
     * The reason the territory was created.
     */
    readonly cause: defines.territory_created_cause
    /**
     * The territory that was created.
     */
    readonly territory: LuaTerritory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_territory_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a territory is destroyed from a surface.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_territory_destroyed Online documentation}
   */
  interface OnTerritoryDestroyedEvent extends EventData {
    /**
     * The territory that will be destroyed. This object will be valid so that you can still read and modify its properties before it is finally destroyed.
     */
    readonly territory: LuaTerritory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_territory_destroyed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_tick Online documentation}
   */
  interface OnTickEvent extends EventData {
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_tick
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called after the results of an entity being mined are collected just before the entity is destroyed.
   *
   * After this event any items in the buffer will be transferred into the tower as if they came from mining the entity.
   *
   * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_tower_mined_plant Online documentation}
   */
  interface OnTowerMinedPlantEvent extends EventData {
    /**
     * The tower doing the mining.
     */
    readonly tower: LuaEntity
    /**
     * The entity that has been mined.
     */
    readonly plant: LuaEntity
    /**
     * The temporary inventory that holds the result of mining the entity.
     */
    readonly buffer: LuaInventory
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_tower_mined_plant
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before an agricultural tower plants a seed.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_tower_planted_seed Online documentation}
   */
  interface OnTowerPlantedSeedEvent extends EventData {
    /**
     * The tower that did the planting.
     */
    readonly tower: LuaEntity
    /**
     * The plant that was planted.
     */
    readonly plant: LuaEntity
    /**
     * The seed that was used.
     */
    readonly seed: ItemIDAndQualityIDPair
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_tower_planted_seed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called before an agricultural tower mines a plant.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_tower_pre_mined_plant Online documentation}
   */
  interface OnTowerPreMinedPlantEvent extends EventData {
    /**
     * The tower that is about to do the mining.
     */
    readonly tower: LuaEntity
    /**
     * The plant that is about to be mined.
     */
    readonly plant: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_tower_pre_mined_plant
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a train changes state (started to stopped and vice versa)
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_train_changed_state Online documentation}
   */
  interface OnTrainChangedStateEvent extends EventData {
    readonly train: LuaTrain
    readonly old_state: defines.train_state
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_train_changed_state
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_train_created Online documentation}
   */
  interface OnTrainCreatedEvent extends EventData {
    readonly train: LuaTrain
    /**
     * The first old train id when splitting/merging trains.
     */
    readonly old_train_id_1?: uint32
    /**
     * The second old train id when splitting/merging trains.
     */
    readonly old_train_id_2?: uint32
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_train_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a trains schedule is changed either by the player or through script.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_train_schedule_changed Online documentation}
   */
  interface OnTrainScheduleChangedEvent extends EventData {
    readonly train: LuaTrain
    /**
     * The player who made the change if any.
     */
    readonly player_index?: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_train_schedule_changed
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_trigger_created_entity Online documentation}
   */
  interface OnTriggerCreatedEntityEvent extends EventData {
    readonly entity: LuaEntity
    readonly source?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_trigger_created_entity
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_trigger_fired_artillery Online documentation}
   */
  interface OnTriggerFiredArtilleryEvent extends EventData {
    readonly entity: LuaEntity
    readonly source?: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_trigger_fired_artillery
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when new packets are processed by {@link LuaHelpers#recv_udp LuaHelpers::recv_udp}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_udp_packet_received Online documentation}
   */
  interface OnUdpPacketReceivedEvent extends EventData {
    /**
     * The packet data
     */
    readonly payload: string
    /**
     * The source port the packet was received from
     */
    readonly source_port: uint16
    /**
     * The player index whose instance received this packet, or 0 if received on the server
     */
    readonly player_index: PlayerIndex
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_udp_packet_received
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when the player triggers "undo".
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_undo_applied Online documentation}
   */
  interface OnUndoAppliedEvent extends EventData {
    /**
     * The player who triggered the undo action.
     */
    readonly player_index: PlayerIndex
    /**
     * The context of the undo action.
     */
    readonly actions: UndoRedoAction[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_undo_applied
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a unit is added to a unit group.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_unit_added_to_group Online documentation}
   */
  interface OnUnitAddedToGroupEvent extends EventData {
    readonly unit: LuaEntity
    readonly group: LuaCommandable
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_unit_added_to_group
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a new unit group is created, before any members are added to it.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_unit_group_created Online documentation}
   */
  interface OnUnitGroupCreatedEvent extends EventData {
    readonly group: LuaCommandable
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_unit_group_created
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a unit group finishes gathering and starts executing its command.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_unit_group_finished_gathering Online documentation}
   */
  interface OnUnitGroupFinishedGatheringEvent extends EventData {
    readonly group: LuaCommandable
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_unit_group_finished_gathering
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a unit is removed from a unit group.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_unit_removed_from_group Online documentation}
   */
  interface OnUnitRemovedFromGroupEvent extends EventData {
    readonly unit: LuaEntity
    readonly group: LuaCommandable
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_unit_removed_from_group
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * Called when a worker (construction or logistic) robot expires through a lack of energy.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#on_worker_robot_expired Online documentation}
   */
  interface OnWorkerRobotExpiredEvent extends EventData {
    readonly robot: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.on_worker_robot_expired
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_built LuaBootstrap::raise_script_built}, or when `raise_built` is passed to {@link LuaSurface#create_entity LuaSurface::create_entity}.
   *
   * Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#script_raised_built Online documentation}
   */
  interface ScriptRaisedBuiltEvent extends EventData {
    /**
     * The entity that has been built.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.script_raised_built
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_destroy LuaBootstrap::raise_script_destroy}, or when `raise_destroy` is passed to {@link LuaEntity#destroy LuaEntity::destroy}.
   *
   * Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#script_raised_destroy Online documentation}
   */
  interface ScriptRaisedDestroyEvent extends EventData {
    /**
     * The entity that was destroyed.
     */
    readonly entity: LuaEntity
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.script_raised_destroy
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * A static event that mods can use to tell other mods they destroyed a segmented unit by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event}, or {@link LuaBootstrap#raise_script_destroy_segmented_unit LuaBootstrap::raise_script_destroy_segmented_unit}, or when `raise_destroy` is passed to {@link LuaSegmentedUnit#destroy LuaSegmentedUnit::destroy}.
   *
   * Event filter: [LuaScriptRaisedDestroySegmentedUnitEventFilter](LuaScriptRaisedDestroySegmentedUnitEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#script_raised_destroy_segmented_unit Online documentation}
   */
  interface ScriptRaisedDestroySegmentedUnitEvent extends EventData {
    /**
     * The segmented unit that was destroyed.
     */
    readonly segmented_unit: LuaSegmentedUnit
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.script_raised_destroy_segmented_unit
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_revive LuaBootstrap::raise_script_revive}, or when `raise_revive` is passed to {@link LuaEntity#revive LuaEntity::revive}.
   *
   * Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#script_raised_revive Online documentation}
   */
  interface ScriptRaisedReviveEvent extends EventData {
    /**
     * The entity that was revived.
     */
    readonly entity: LuaEntity
    /**
     * The tags associated with this entity, if any.
     */
    readonly tags?: Tags
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.script_raised_revive
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * A static event mods can use to tell other mods they changed tiles on a surface by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_set_tiles LuaBootstrap::raise_script_set_tiles}, or when `raise_event` is passed to {@link LuaSurface#set_tiles LuaSurface::set_tiles}.
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#script_raised_set_tiles Online documentation}
   */
  interface ScriptRaisedSetTilesEvent extends EventData {
    /**
     * The surface whose tiles were changed.
     */
    readonly surface_index: SurfaceIndex
    /**
     * The tiles that were changed.
     */
    readonly tiles: Tile[]
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.script_raised_set_tiles
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
  /**
   * A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_teleported LuaBootstrap::raise_script_teleported}, or when `raise_teleported` is passed to {@link LuaControl#teleport LuaControl::teleport}.
   *
   * Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
   * @see {@link https://lua-api.factorio.com/2.0.75/events.html#script_raised_teleported Online documentation}
   */
  interface ScriptRaisedTeleportedEvent extends EventData {
    /**
     * The entity that was teleported.
     */
    readonly entity: LuaEntity
    /**
     * The entity's surface before the teleportation.
     */
    readonly old_surface_index: uint8
    /**
     * The entity's position before the teleportation.
     */
    readonly old_position: MapPosition
    /**
     * Identifier of the event
     */
    readonly name: typeof defines.events.script_raised_teleported
    /**
     * Tick the event was generated.
     */
    readonly tick: uint32
  }
}
