factorio-types 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/classes.d.ts +11920 -17966
- package/dist/concepts.d.ts +4439 -4091
- package/dist/datacollection.d.ts +596 -0
- package/dist/defines.d.ts +1231 -1230
- package/dist/events.d.ts +2199 -735
- package/dist/global.d.ts +12 -18
- package/dist/prototypes.d.ts +5452 -5895
- package/dist/types.d.ts +5751 -5906
- package/index.d.ts +1 -0
- package/package.json +7 -8
package/README.md
CHANGED
|
@@ -39,6 +39,10 @@ Primitive types like `uint8` or `nil` are preserved from the docs to better repr
|
|
|
39
39
|
|
|
40
40
|
Note that since typescript has a single `number` type, the compiler will **not** prevent things like passing a `float` to a method that expects `uint8` because these are both just `number` types under the hood.
|
|
41
41
|
|
|
42
|
+
## Lua tables
|
|
43
|
+
|
|
44
|
+
Various types in the Factorio API are implemented as lua tables, specifically those with a `complex_type` of `dictionary` or `LuaCustomTable`. These types have intentionally been implemented as [Record](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type) types instead of TypescriptToLua's [Lua Table Type](https://typescripttolua.github.io/docs/advanced/language-extensions/#lua-table-types) because `LuaTable`s cannot be instantiated with `{ key1: 'value1', key2: 'value2' }` initializer syntax, and instead repeated calls to `set()` would be required, making initialization of such objects considerably more verbose.
|
|
45
|
+
|
|
42
46
|
## Lualib
|
|
43
47
|
|
|
44
48
|
Factorio makes various lua functions available to mods via [LuaLib](https://github.com/wube/factorio-data/tree/master/core/lualib)
|