- Updated to factorio version 2.0.41
- Updated to factorio version 2.0.39
- Updated to factorio version 2.0.35
- Updated to factorio version 2.0.34
- Fix that LuaGuiElement::elem_value should be able to be
nil
- Updated to factorio version 2.0.32
- Updated to factorio version 2.0.31
- Updated to factorio version 2.0.29
- Updated to factorio version 2.0.28
- Updated to factorio version 2.0.25
- Updated to factorio version 2.0.24
- Includes typings for new event id handling
- Updated to factorio version 2.0.23
- Updated to factorio version 2.0.22
- Fix that vehicle_automatic_targeting_parameters was not optional in BlueprintEntity
- Updated to factorio version 2.0.21
- Updated type of BlueprintEntity for Factorio v2.0! Special thanks to thedoh for helping out.
- Added different write-types for FluidID, ItemID, etc., and types that include them.
- Updated to factorio version 2.0.17
- Fix LuaControl.crafting_queue to be potentially undefined (#47). Thanks @nmalaguti!
- Deduplicated types in union types.
- Updated to factorio version 2.0.16
- Fix game.forces to be LuaForce instead of LuaSurface (#46). Thanks @nmalaguti!
- Updated to factorio version 2.0.15
- Defines enum values are no longer string escaped when not necessary.
- Added definition for the "feature_flags" global.
- Updated to factorio 2.0!! SPAAACE!!
- Simplified types for ChooseElemButtonSpec; it is no longer a discriminated union for each subtype.
- Iteration key type for
LuaCustomTable
s are now accurate.
The major version has been bumped to reflect breaking changes in the factorio API. However, the way typed-factorio is accessed or configured has not changed.
- Updated to a newer revision of factorio version 1.1.110
- Updated to factorio version 1.1.110
- Updated to factorio version 1.1.109
- Updated to factorio version 1.1.108
- Updated to factorio version 1.1.107
- Added types for the new "color-setting".
- Fixed wrong spelling for
localised_name
andlocalised_description
in settings definitions.
- Updated to factorio version 1.1.105
- Fixed links to
defines
in documentation comments for the prototype stage
-
The
type
attribute of prototype classes now includes all subclasses of that prototype. For instance,EntityPrototype.type
includes"accumulator"
,"assembling-machine"
, etc. -
Added
AchievmentType
,EntityType
,EquipmentType
, andItemType
types, which lists all typenames for the specific prototype type. -
In runtime types, the values for
type
andghost_type
attributes are specified to be specific prototype typenames when possible. For instance,LuaEntity.type
now has typeEntityType
instead ofstring
. -
Updated to factorio version 1.1.104
- The type definition for ColorArray and ColorModifierArray are now readonly, consistent with other array types.
- Updated to factorio version 1.1.103
- Fixed type definition for ColorArray and ColorModifierArray
- Added feature
CustomInputNames
. By extending this interface, this allows optionally type-checking custom input names. For more details, see the README, or the documentation onCustomInputNames
(in thefactorio:common
module). - Removed
readonly
property from prototypetype
fields. This may be useful when copying another prototype for a sub-prototype. - Updated to factorio version 1.1.101
- Updated to factorio version 1.1.97
- Updated to factorio version 1.1.95
- Updated to factorio version 1.1.94
- Updated to factorio version 1.1.92
- Updated to factorio version 1.1.90
- Added manual type definition for CraftingMachinePrototype.fluid_boxes. Thanks @Bilka2!
- Added complete types for the prototype stage! See the README for more details.
- With the addition of prototype stage types, types are no longer global. Instead, types are divided into the "virtual"
modules
"factorio:settings"
,"factorio:prototype"
, and"factorio:runtime"
.- The
defines
andserpent
namespaces are still global.
- The
- The placeholder types for the data and settings stage have been removed; see the README for how to add the full types.
- The "strict index types" option is now always applied (no longer an opt-in feature).
- The deprecated
Read
types have been removed.
- In online documentation links, the specific factorio version instead of "latest".
- Documentation comments updated to be more similar to the online documentation.
- Updated to factorio version 1.1.89
- Updated to factorio version 1.1.86
- Updated to factorio version 1.1.83
- Updated to factorio version 1.1.82
- Updated to factorio version 1.1.77
- Updated to factorio version 1.1.75
- Updated to factorio version 1.1.74
- Updated to factorio version 1.1.72
- Fix BlueprintControlBehavior.filters
- BlueprintEntity.infinity_filters can also be of type InfinityPipeFilter
- Updated to factorio version 1.1.71
- Updated to factorio version 1.1.70
- Fixed online documentation links for operators
- Added optional typing for remote interface calls
- Updated to factorio version 1.1.69
- Fix advanced types of method returns (nullability, string unions, etc.)
- Improve types of "util" lualib module
- Made compatible with typescript v4.8
- Added proper nullablity to members with different read/write types
- Deduped union types
- Updated to factorio version 1.1.67
- Fixed write type for
BoundingBox
. - Simplified types for BlueprintEntity.
- Updated to factorio version 1.1.64
- Added old
Read
types as deprecated type aliases of new types; to help with migration.
- Read-only forms of concepts (the most common form used) is now specified with just the name; forms with a
Read
orTable
suffix have been removed. - Write forms are now specified as either a union of table and array forms, or with a
Write
suffix for concepts.- For table-or-array concepts:
MapPositionRead
->MapPosition
,MapPosition
->MapPosition | PositionArray
- For table concepts:
ScriptAreaRead
->ScriptArea
,ScriptArea
->ScriptAreaWrite
- For table-or-array concepts:
- The minimum TSTL version has been increased to v1.6.1 (A bug with documentation comments was fixed in that version).
- Updated to factorio version 1.1.63.
- Upgraded to factorio api docs json version 3.
- The new type
nil
is used instead ofundefined
(they are equivalent). - More complete type for
BlueprintEntity
. - Fixed missing read-write forms for more concepts.
- Improved documentation comments (enabled by json docs version 3).
- Improved documentation comments for variant parameter groups.
- Improve doc comments for enum concepts
- Improve doc comment formatting
- Improve types of concepts with literal union types
- Add read-specific types to AutoplaceControl and ComparatorString
- Move "notes" comment into the main body of doc comment, instead of in @remarks. This works around #13.
- Add manually defined overload for LuaControl::teleport().
- Use @linkplain instead of @link for web links. This hopefully works around issue #13
- Updated to factorio version 1.1.61
- Updated to factorio version 1.1.60
- Updated to factorio version 1.1.59
- This project now has all features that were originally planned, and can now guarantee reasonable backwards compatibility for future releases.
- Updated to factorio version 1.1.57
- Updated to factorio version 1.1.56
- This is an opt-in feature: Some numeric types which represent indices/number,e.g. player_index, entity_number, are
now branded numbers with their own type, e.g.
PlayerIndex
andEntityNumber
. See the README for more info. - Added custom-index-template.d.ts to assist trying out custom changes to types in a project.
- Updated to factorio version 1.1.53
- Updated to json api version 2
- Improved documentation comments
Position
,PositionArray
, andPositionTable
have been replaced byMapPosition
,MapPositionArray
, andMapPositionTable
respectively. These are now deprecated and may be removed in a future version.
TechnologyIdentification
now also has a more specific type when read.
ForceIdentification
andItemPrototypeIdentification
now have more specific types when read.- Properties which represent a flag concept now have the correct specific type, instead of
string
.
- Fixed documentation links for events
- Updated to factorio version 1.1.52
LuaCustomTable
can be iterated on in a for-of loop directly (without usingpairs
). This requires TSTL v1.3.0 or later.- TSTL dependency minimum version is now v1.3.0.
- Table or array concepts are now declared in table form wherever it is an "read" position.
- This works with setter overloading for applicable properties:
player.color.x; player.color = [1, 1, 1]
is now valid! - This also applies to concepts/complex types which contain table_or_array properties.
- This works with setter overloading for applicable properties:
- Some concepts now also have a special form where it is known to be in a "read" position, where all table_or_array
concepts are declared in table form. These concepts are suffixed with "Read", e.g.
ScriptAreaRead
. - Arrays which are known to be in a "write" only form (e.g. method parameters) now are marked readonly. This means you can now pass readonly arrays to these methods.
MapPosition
is now a table or array concept.- Classes with subclasses are now declared with all properties, instead of an intersection of subclasses (reversion)
- Subclass specializations added for some missing classes
- LuaStyle:
extra_margin/padding_when_activated
is now for subclass scroll_pane
- LuaStyle size, margin/padding setters now have more specific array types. These array types are
SizeArray
andStyleValuesArray
for size and margin/padding, respectively. @noSelf
annotation is now only present when necessary.- For classes with subclasses:
- The original class name (e.g.
LuaItemStack
) still contains attributes of all subclasses (same as before). - There is now a
Base
type (e.g.BaseItemStack
) which only includes attributes common to all subclasses. - There is a separate type definition for each subclass, e.g.
BlueprintItem
. Note that one instance may still belong to multiple subclasses (the subclasses are not mutually exclusive). - The above two can be optionally used for stricter types.
- The original class name (e.g.
- Fix: resize_to_sprite property should not be on subclass sprite-button
- Fix: ChooseElemButtonSpec filters should be named elem_filters
- Switch back to
/latest
api docs link- New version of web api docs is now active
- Update to factorio version 1.1.49
- Update to factorio version 1.1.48
- Localised strings now accept boolean and undefined.
- Update to factorio version 1.1.46
- LuaGuiElement.style and LuaControl.opened now have different get/set types (more specific get type).
- The array form of LocalizedString is now readonly.
- Update to factorio version 1.1.43
- The
defines.events
type was renamed todefines.Events
, to reduce confusion between the namespace/type
- All event types now explicitly extend
EventData
- Variant parameter groups without additional fields now have their own type, instead of all being grouped into
Other
- Update to factorio version 1.1.42
- No api changes, but improvements to descriptions
- Fix minor issue for event types
- Updated to factorio version 1.1.41 (no changes to lua api)
- Improved smart types for events
- Added type for BlueprintControlBehavior
- Updated to factorio version 1.1.40
- Fixed regression with duplicate strings in string union types
- Updated to factorio version 1.1.39
- Documentation links now point to the new API docs website. More info here: https://forums.factorio.com/viewtopic.php?f=34&t=99797
- LuaRemote.addInterface now lets remote functions take any arguments.
- Only the latest version api is now provided.
- It is now accessed using
typed-factorio/runtime
instead oftyped-factorio/<version>
- Basic types for settings and data stage. See README for more details.
- Types for "util" and "mod-gui" lualib modules
- LuaGuiElement::add with a literal now give diagnostic if you supply a field that shouldn't be there.
- Split generated files into multiple files
- Improved compilation tests
- Added factorio version
1.1.38
AnyBasic
now uses typetable
instead of typeRecord<any, AnyBasic>
- README changes
- Initial release