typed-factorio 0.13.2 → 0.16.0

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.
@@ -101,16 +101,20 @@ type PositionArray = readonly [x: int, y: int]
101
101
  */
102
102
  type Position = PositionTable | PositionArray
103
103
 
104
+ interface MapPositionTable {
105
+ readonly x: double
106
+ readonly y: double
107
+ }
108
+
109
+ type MapPositionArray = readonly [x: double, y: double]
110
+
104
111
  /**
105
112
  * Coordinates of an entity on a map. This uses the same format as {@link Position}, meaning it can be specified either
106
113
  * with or without explicit keys.
107
114
  *
108
115
  * {@link https://lua-api.factorio.com/latest/Concepts.html#MapPosition View documentation}
109
116
  */
110
- interface MapPosition {
111
- readonly x: double
112
- readonly y: double
113
- }
117
+ type MapPosition = MapPositionTable | MapPositionArray
114
118
 
115
119
  interface ChunkPositionTable {
116
120
  readonly x: int
@@ -167,7 +171,7 @@ type GuiLocation = GuiLocationTable | GuiLocationArray
167
171
  interface ChunkPositionAndArea {
168
172
  readonly x: int
169
173
  readonly y: int
170
- readonly area: BoundingBox
174
+ readonly area: BoundingBoxRead
171
175
  }
172
176
 
173
177
  /**
@@ -201,7 +205,7 @@ interface TabAndContent {
201
205
 
202
206
  interface OldTileAndPosition {
203
207
  readonly old_tile: LuaTilePrototype
204
- readonly position: TilePosition
208
+ readonly position: TilePositionTable
205
209
  }
206
210
 
207
211
  /**
@@ -230,7 +234,7 @@ interface SmokeSource {
230
234
  readonly east_position?: PositionTable
231
235
  readonly south_position?: PositionTable
232
236
  readonly west_position?: PositionTable
233
- readonly deviation?: Position
237
+ readonly deviation?: PositionTable
234
238
  readonly starting_frame_speed: uint16
235
239
  readonly starting_frame_speed_deviation: double
236
240
  readonly starting_frame: uint16
@@ -285,6 +289,13 @@ type BoundingBoxArray = readonly [left_top: Position, right_bottom: Position, or
285
289
  */
286
290
  type BoundingBox = BoundingBoxTable | BoundingBoxArray
287
291
 
292
+ /** @addAfter BoundingBox */
293
+ interface BoundingBoxRead extends BoundingBoxTable {
294
+ readonly left_top: PositionTable
295
+ readonly right_bottom: PositionTable
296
+ readonly orientation?: RealOrientation
297
+ }
298
+
288
299
  /**
289
300
  * An area defined using the map editor.
290
301
  *
@@ -297,6 +308,11 @@ interface ScriptArea {
297
308
  readonly id: uint
298
309
  }
299
310
 
311
+ interface ScriptAreaRead extends ScriptArea {
312
+ readonly area: BoundingBoxRead
313
+ readonly color: ColorTable
314
+ }
315
+
300
316
  /**
301
317
  * A position defined using the map editor.
302
318
  *
@@ -309,6 +325,11 @@ interface ScriptPosition {
309
325
  readonly id: uint
310
326
  }
311
327
 
328
+ interface ScriptPositionRead extends ScriptPosition {
329
+ readonly position: PositionTable
330
+ readonly color: ColorTable
331
+ }
332
+
312
333
  interface ColorTable {
313
334
  readonly r?: float
314
335
  readonly g?: float
@@ -368,7 +389,7 @@ interface Alert {
368
389
  readonly tick: uint
369
390
  readonly target?: LuaEntity
370
391
  readonly prototype?: LuaEntityPrototype
371
- readonly position?: Position
392
+ readonly position?: PositionTable
372
393
  /** The SignalID used for a custom alert. Only present for custom alerts. */
373
394
  readonly icon?: SignalID
374
395
  /** The message for a custom alert. Only present for custom alerts. */
@@ -388,7 +409,7 @@ interface ScriptRenderVertexTarget {
388
409
 
389
410
  interface PathfinderWaypoint {
390
411
  /** The position of the waypoint on its surface. */
391
- readonly position: Position
412
+ readonly position: PositionTable
392
413
  /** `true` if the path from the previous waypoint to this one goes through an entity that must be destroyed. */
393
414
  readonly needs_destroy_to_reach: boolean
394
415
  }
@@ -414,7 +435,7 @@ interface Decorative {
414
435
  }
415
436
 
416
437
  interface DecorativeResult {
417
- readonly position: TilePosition
438
+ readonly position: TilePositionTable
418
439
  readonly decorative: LuaDecorativePrototype
419
440
  readonly amount: uint
420
441
  }
@@ -873,18 +894,34 @@ interface DifficultySettings {
873
894
  readonly research_queue_setting: "after-victory" | "always" | "never"
874
895
  }
875
896
 
897
+ /**
898
+ * All regular {@link MapSettings} plus an additional table that contains the {@link DifficultySettings}.
899
+ *
900
+ * {@link https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings View documentation}
901
+ */
902
+ interface MapAndDifficultySettings {
903
+ readonly pollution: PollutionMapSettings
904
+ readonly enemy_evolution: EnemyEvolutionMapSettings
905
+ readonly enemy_expansion: EnemyExpansionMapSettings
906
+ readonly unit_group: UnitGroupMapSettings
907
+ readonly steering: SteeringMapSettings
908
+ readonly path_finder: PathFinderMapSettings
909
+ /**
910
+ * If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck
911
+ * within their own base.
912
+ */
913
+ readonly max_failed_behavior_count: uint
914
+ readonly difficulty_settings: DifficultySettings
915
+ }
916
+
876
917
  /**
877
918
  * The data that can be extracted from a map exchange string, as a plain table.
878
919
  *
879
920
  * {@link https://lua-api.factorio.com/latest/Concepts.html#MapExchangeStringData View documentation}
880
921
  */
881
922
  interface MapExchangeStringData {
882
- /**
883
- * All the regular map settings plus an additional table called `difficulty_settings` that contains the
884
- * {@link DifficultySettings}.
885
- */
886
- readonly map_settings: MapSettings
887
- readonly map_gen_settings: MapGenSettings
923
+ readonly map_settings: MapAndDifficultySettings
924
+ readonly map_gen_settings: MapGenSettingsRead
888
925
  }
889
926
 
890
927
  interface BlueprintItemIcon {
@@ -982,6 +1019,11 @@ interface BlueprintEntity {
982
1019
  readonly schedule?: TrainScheduleRecord[]
983
1020
  }
984
1021
 
1022
+ interface BlueprintEntityRead extends BlueprintEntity {
1023
+ /** The position of the entity. */
1024
+ readonly position: PositionTable
1025
+ }
1026
+
985
1027
  interface Tile {
986
1028
  /** The position of the tile. */
987
1029
  readonly position: Position
@@ -989,6 +1031,11 @@ interface Tile {
989
1031
  readonly name: string
990
1032
  }
991
1033
 
1034
+ interface TileRead extends Tile {
1035
+ /** The position of the tile. */
1036
+ readonly position: PositionTable
1037
+ }
1038
+
992
1039
  interface Fluid {
993
1040
  /** Fluid prototype name of the fluid. */
994
1041
  readonly name: string
@@ -1584,6 +1631,11 @@ interface MapGenSettings {
1584
1631
  readonly property_expression_names: Record<string, string>
1585
1632
  }
1586
1633
 
1634
+ interface MapGenSettingsRead extends MapGenSettings {
1635
+ /** Positions of the starting areas. */
1636
+ readonly starting_points: PositionTable[]
1637
+ }
1638
+
1587
1639
  interface SignalID {
1588
1640
  /** `"item"`, `"fluid"`, or `"virtual"`. */
1589
1641
  readonly type: "item" | "fluid" | "virtual"
@@ -1848,6 +1900,15 @@ interface GoToLocationCommand extends BaseCommand {
1848
1900
  readonly radius?: double
1849
1901
  }
1850
1902
 
1903
+ interface GoToLocationCommandRead extends BaseCommand, GoToLocationCommand {
1904
+ readonly type: defines.command.go_to_location
1905
+ /**
1906
+ * The position to path to. Either this or `destination_entity` need to be specified. If both are,
1907
+ * `destination_entity` is used.
1908
+ */
1909
+ readonly destination?: PositionTable
1910
+ }
1911
+
1851
1912
  interface CompoundCommand extends BaseCommand {
1852
1913
  readonly type: defines.command.compound
1853
1914
  /** How the commands should be chained together. */
@@ -1856,6 +1917,12 @@ interface CompoundCommand extends BaseCommand {
1856
1917
  readonly commands: Command[]
1857
1918
  }
1858
1919
 
1920
+ interface CompoundCommandRead extends BaseCommand, CompoundCommand {
1921
+ readonly type: defines.command.compound
1922
+ /** The sub-commands. */
1923
+ readonly commands: CommandRead[]
1924
+ }
1925
+
1859
1926
  interface GroupCommand extends BaseCommand {
1860
1927
  readonly type: defines.command.group
1861
1928
  /** The group whose command to follow. */
@@ -1876,6 +1943,12 @@ interface AttackAreaCommand extends BaseCommand {
1876
1943
  readonly distraction?: defines.distraction
1877
1944
  }
1878
1945
 
1946
+ interface AttackAreaCommandRead extends BaseCommand, AttackAreaCommand {
1947
+ readonly type: defines.command.attack_area
1948
+ /** Center of the attack area. */
1949
+ readonly destination: PositionTable
1950
+ }
1951
+
1879
1952
  interface WanderCommand extends BaseCommand {
1880
1953
  readonly type: defines.command.wander
1881
1954
  /** Defaults to `defines.distraction.by_enemy`. */
@@ -1922,6 +1995,23 @@ interface BuildBaseCommand extends BaseCommand {
1922
1995
  readonly ignore_planner?: boolean
1923
1996
  }
1924
1997
 
1998
+ interface BuildBaseCommandRead extends BaseCommand, BuildBaseCommand {
1999
+ readonly type: defines.command.build_base
2000
+ /** Where to build the base. */
2001
+ readonly destination: PositionTable
2002
+ }
2003
+
2004
+ type CommandRead =
2005
+ | AttackCommand
2006
+ | GoToLocationCommandRead
2007
+ | CompoundCommandRead
2008
+ | GroupCommand
2009
+ | AttackAreaCommandRead
2010
+ | WanderCommand
2011
+ | StopCommand
2012
+ | FleeCommand
2013
+ | BuildBaseCommandRead
2014
+
1925
2015
  /**
1926
2016
  * Commands can be given to enemies and unit groups.
1927
2017
  *
@@ -2243,7 +2333,7 @@ interface BeamTarget {
2243
2333
  /** The target entity. */
2244
2334
  readonly entity?: LuaEntity
2245
2335
  /** The target position. */
2246
- readonly position?: Position
2336
+ readonly position?: PositionTable
2247
2337
  }
2248
2338
 
2249
2339
  interface RidingState {
@@ -2837,7 +2927,7 @@ interface SelectedPrototypeData {
2837
2927
  interface ScriptRenderTarget {
2838
2928
  readonly entity?: LuaEntity
2839
2929
  readonly entity_offset?: Vector
2840
- readonly position?: Position
2930
+ readonly position?: PositionTable
2841
2931
  }
2842
2932
 
2843
2933
  type MouseButtonFlag =
@@ -6543,6 +6633,23 @@ type LuaSectorScannedEventFilter =
6543
6633
  | TransportBeltConnectableSectorScannedEventFilter
6544
6634
  | CircuitNetworkConnectableSectorScannedEventFilter
6545
6635
 
6636
+ type StyleValuesArray =
6637
+ | readonly [topBottom: number, leftRight: number]
6638
+ | readonly [top: number, right: number, bottom: number, left: number]
6639
+
6640
+ type SizeArray = readonly [width: int, height: int]
6641
+
6642
+ type RaiseableEvents =
6643
+ | typeof defines.events.on_console_chat
6644
+ | typeof defines.events.on_player_crafted_item
6645
+ | typeof defines.events.on_player_fast_transferred
6646
+ | typeof defines.events.on_biter_base_built
6647
+ | typeof defines.events.on_market_item_purchased
6648
+ | typeof defines.events.script_raised_built
6649
+ | typeof defines.events.script_raised_destroy
6650
+ | typeof defines.events.script_raised_revive
6651
+ | typeof defines.events.script_raised_set_tiles
6652
+
6546
6653
  /**
6547
6654
  * A map gen preset. Used in {@link https://wiki.factorio.com/Prototype/MapGenPresets Prototype/MapGenPresets}.
6548
6655
  *
@@ -13,7 +13,7 @@ interface CustomInputEvent extends EventData {
13
13
  /** The prototype name of the custom input that was activated. */
14
14
  readonly input_name: string
15
15
  /** The mouse cursor position when the custom input was activated. */
16
- readonly cursor_position: Position
16
+ readonly cursor_position: PositionTable
17
17
  /** Information about the prototype that is selected when the custom input is used. `nil` if none is selected. */
18
18
  readonly selected_prototype?: SelectedPrototypeData
19
19
  /** Identifier of the event */
@@ -46,9 +46,9 @@ interface OnAiCommandCompletedEvent extends EventData {
46
46
  */
47
47
  interface OnAreaClonedEvent extends EventData {
48
48
  readonly source_surface: LuaSurface
49
- readonly source_area: BoundingBox
49
+ readonly source_area: BoundingBoxRead
50
50
  readonly destination_surface: LuaSurface
51
- readonly destination_area: BoundingBox
51
+ readonly destination_area: BoundingBoxRead
52
52
  readonly destination_force?: LuaForce
53
53
  readonly clone_tiles: boolean
54
54
  readonly clone_entities: boolean
@@ -84,10 +84,10 @@ interface OnBiterBaseBuiltEvent extends EventData {
84
84
  * {@link https://lua-api.factorio.com/latest/Events.html#on_brush_cloned View documentation}
85
85
  */
86
86
  interface OnBrushClonedEvent extends EventData {
87
- readonly source_offset: TilePosition
88
- readonly destination_offset: TilePosition
87
+ readonly source_offset: TilePositionTable
88
+ readonly destination_offset: TilePositionTable
89
89
  readonly source_surface: LuaSurface
90
- readonly source_positions: TilePosition[]
90
+ readonly source_positions: TilePositionTable[]
91
91
  readonly destination_surface: LuaSurface
92
92
  readonly destination_force?: LuaForce
93
93
  readonly clone_tiles: boolean
@@ -236,9 +236,9 @@ interface OnChartTagRemovedEvent extends EventData {
236
236
  */
237
237
  interface OnChunkChartedEvent extends EventData {
238
238
  readonly surface_index: uint
239
- readonly position: ChunkPosition
239
+ readonly position: ChunkPositionTable
240
240
  /** Area of the chunk. */
241
- readonly area: BoundingBox
241
+ readonly area: BoundingBoxRead
242
242
  readonly force: LuaForce
243
243
  /** Identifier of the event */
244
244
  readonly name: typeof defines.events.on_chunk_charted
@@ -254,7 +254,7 @@ interface OnChunkChartedEvent extends EventData {
254
254
  interface OnChunkDeletedEvent extends EventData {
255
255
  readonly surface_index: uint
256
256
  /** The chunks deleted. */
257
- readonly positions: ChunkPosition[]
257
+ readonly positions: ChunkPositionTable[]
258
258
  /** Identifier of the event */
259
259
  readonly name: typeof defines.events.on_chunk_deleted
260
260
  /** Tick the event was generated. */
@@ -268,9 +268,9 @@ interface OnChunkDeletedEvent extends EventData {
268
268
  */
269
269
  interface OnChunkGeneratedEvent extends EventData {
270
270
  /** Area of the chunk. */
271
- readonly area: BoundingBox
271
+ readonly area: BoundingBoxRead
272
272
  /** Position of the chunk. */
273
- readonly position: ChunkPosition
273
+ readonly position: ChunkPositionTable
274
274
  /** The surface the chunk is on. */
275
275
  readonly surface: LuaSurface
276
276
  /** Identifier of the event */
@@ -748,7 +748,7 @@ interface OnGuiClosedEvent extends EventData {
748
748
  /** The technology that was automatically selected when opening the research GUI */
749
749
  readonly technology?: LuaTechnology
750
750
  /** The tile position that was open */
751
- readonly tile_position?: TilePosition
751
+ readonly tile_position?: TilePositionTable
752
752
  /** Identifier of the event */
753
753
  readonly name: typeof defines.events.on_gui_closed
754
754
  /** Tick the event was generated. */
@@ -1120,7 +1120,7 @@ interface OnPlayerAltSelectedAreaEvent extends EventData {
1120
1120
  /** The surface selected. */
1121
1121
  readonly surface: LuaSurface
1122
1122
  /** The area selected. */
1123
- readonly area: BoundingBox
1123
+ readonly area: BoundingBoxRead
1124
1124
  /** The item used to select the area. */
1125
1125
  readonly item: string
1126
1126
  /** The entities selected. */
@@ -1307,7 +1307,7 @@ interface OnPlayerClickedGpsTagEvent extends EventData {
1307
1307
  /** Index of the player */
1308
1308
  readonly player_index: uint
1309
1309
  /** Map position contained in gps tag */
1310
- readonly position: Position
1310
+ readonly position: PositionTable
1311
1311
  /** Surface name contained in gps tag, even when such surface does not exists */
1312
1312
  readonly surface: string
1313
1313
  /** Identifier of the event */
@@ -1402,7 +1402,7 @@ interface OnPlayerDeconstructedAreaEvent extends EventData {
1402
1402
  /** The surface selected. */
1403
1403
  readonly surface: LuaSurface
1404
1404
  /** The area selected. */
1405
- readonly area: BoundingBox
1405
+ readonly area: BoundingBoxRead
1406
1406
  /** The item used to select the area. */
1407
1407
  readonly item: string
1408
1408
  /** If normal selection or alt selection was used. */
@@ -1824,7 +1824,7 @@ interface OnPlayerSelectedAreaEvent extends EventData {
1824
1824
  /** The surface selected. */
1825
1825
  readonly surface: LuaSurface
1826
1826
  /** The area selected. */
1827
- readonly area: BoundingBox
1827
+ readonly area: BoundingBoxRead
1828
1828
  /** The item used to select the area. */
1829
1829
  readonly item: string
1830
1830
  /** The entities selected. */
@@ -1861,7 +1861,7 @@ interface OnPlayerSetupBlueprintEvent extends EventData {
1861
1861
  /** The surface selected. */
1862
1862
  readonly surface: LuaSurface
1863
1863
  /** The area selected. */
1864
- readonly area: BoundingBox
1864
+ readonly area: BoundingBoxRead
1865
1865
  /** The item used to select the area. */
1866
1866
  readonly item: string
1867
1867
  /** If normal selection or alt selection was used. */
@@ -1963,7 +1963,7 @@ interface OnPlayerUsedCapsuleEvent extends EventData {
1963
1963
  /** The capsule item used. */
1964
1964
  readonly item: LuaItemPrototype
1965
1965
  /** The position the capsule was used. */
1966
- readonly position: Position
1966
+ readonly position: PositionTable
1967
1967
  /** Identifier of the event */
1968
1968
  readonly name: typeof defines.events.on_player_used_capsule
1969
1969
  /** Tick the event was generated. */
@@ -1981,7 +1981,7 @@ interface OnPlayerUsedSpiderRemoteEvent extends EventData {
1981
1981
  /** Spider vehicle which was requested to move. */
1982
1982
  readonly vehicle: LuaEntity
1983
1983
  /** Goal position to which spidertron was sent to. */
1984
- readonly position: Position
1984
+ readonly position: PositionTable
1985
1985
  /** If the use was successful. It may fail when spidertron has different driver or when player is on different surface. */
1986
1986
  readonly success: boolean
1987
1987
  /** Identifier of the event */
@@ -2001,7 +2001,7 @@ interface OnPostEntityDiedEvent extends EventData {
2001
2001
  /** The force that did the killing if any. */
2002
2002
  readonly force?: LuaForce
2003
2003
  /** Position where the entity died. */
2004
- readonly position: Position
2004
+ readonly position: PositionTable
2005
2005
  /** The entity prototype of the entity that died. */
2006
2006
  readonly prototype: LuaEntityPrototype
2007
2007
  /** The damage type if any. */
@@ -2027,7 +2027,7 @@ interface OnPreBuildEvent extends EventData {
2027
2027
  /** The player who did the placing. */
2028
2028
  readonly player_index: uint
2029
2029
  /** Where the item was placed. */
2030
- readonly position: Position
2030
+ readonly position: PositionTable
2031
2031
  /** Item was placed using shift building. */
2032
2032
  readonly shift_build: boolean
2033
2033
  /** The direction the item was facing when placed. */
@@ -2052,7 +2052,7 @@ interface OnPreBuildEvent extends EventData {
2052
2052
  interface OnPreChunkDeletedEvent extends EventData {
2053
2053
  readonly surface_index: uint
2054
2054
  /** The chunks to be deleted. */
2055
- readonly positions: ChunkPosition[]
2055
+ readonly positions: ChunkPositionTable[]
2056
2056
  /** Identifier of the event */
2057
2057
  readonly name: typeof defines.events.on_pre_chunk_deleted
2058
2058
  /** Tick the event was generated. */
@@ -2574,9 +2574,9 @@ interface OnScriptTriggerEffectEvent extends EventData {
2574
2574
  readonly effect_id: string
2575
2575
  /** The surface the effect happened on. */
2576
2576
  readonly surface_index: uint
2577
- readonly source_position?: Position
2577
+ readonly source_position?: PositionTable
2578
2578
  readonly source_entity?: LuaEntity
2579
- readonly target_position?: Position
2579
+ readonly target_position?: PositionTable
2580
2580
  readonly target_entity?: LuaEntity
2581
2581
  /** Identifier of the event */
2582
2582
  readonly name: typeof defines.events.on_script_trigger_effect
@@ -2594,9 +2594,9 @@ interface OnSectorScannedEvent extends EventData {
2594
2594
  /** The radar that did the scanning. */
2595
2595
  readonly radar: LuaEntity
2596
2596
  /** The chunk scanned. */
2597
- readonly chunk_position: ChunkPosition
2597
+ readonly chunk_position: ChunkPositionTable
2598
2598
  /** Area of the scanned chunk. */
2599
- readonly area: BoundingBox
2599
+ readonly area: BoundingBoxRead
2600
2600
  /** Identifier of the event */
2601
2601
  readonly name: typeof defines.events.on_sector_scanned
2602
2602
  /** Tick the event was generated. */
@@ -2958,7 +2958,7 @@ interface ScriptRaisedSetTilesEvent extends EventData {
2958
2958
  /** The surface whose tiles were changed. */
2959
2959
  readonly surface_index: uint
2960
2960
  /** The tiles that were changed. */
2961
- readonly tiles: Tile[]
2961
+ readonly tiles: TileRead[]
2962
2962
  /** Identifier of the event */
2963
2963
  readonly name: typeof defines.events.script_raised_set_tiles
2964
2964
  /** Tick the event was generated. */
@@ -1,7 +1,9 @@
1
+ // This is an auto-generated file. Do not edit directly!
2
+
1
3
  ///<reference types="lua-types/5.2" />
2
4
  ///<reference path="builtin-types.d.ts" />
5
+ ///<reference path="global-objects.d.ts" />
3
6
  ///<reference path="defines.d.ts" />
4
7
  ///<reference path="events.d.ts" />
5
8
  ///<reference path="classes.d.ts" />
6
9
  ///<reference path="concepts.d.ts" />
7
- ///<reference path="global-objects.d.ts" />
@@ -0,0 +1,9 @@
1
+ declare module "typescript" {
2
+ interface JSDocContainer {
3
+ jsDoc?: JSDoc[]
4
+ }
5
+ interface Node {
6
+ emitNode?: unknown
7
+ }
8
+ }
9
+ export {}
package/package.json CHANGED
@@ -1,58 +1,58 @@
1
- {
2
- "name": "typed-factorio",
3
- "version": "0.13.2",
4
- "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
- "keywords": [
6
- "factorio",
7
- "types",
8
- "typescript-to-lua",
9
- "tstl"
10
- ],
11
- "repository": "https://github.com/GlassBricks/typed-factorio",
12
- "license": "MIT",
13
- "files": [
14
- "**/*.d.ts"
15
- ],
16
- "homepage": "https://github.com/GlassBricks/typed-factorio#readme",
17
- "scripts": {
18
- "gen": "ts-node -P generator/tsconfig.json generator/index.ts",
19
- "generate": "yarn run gen --in ./generatorSrc --out ./generated --warn-as-error",
20
- "generate:dev": "yarn run gen --in ./generatorSrc --out ./generated --no-format",
21
- "clean": "rimraf generated",
22
- "pretest": "yarn run generate",
23
- "test": "jest",
24
- "lint": "eslint .",
25
- "check": "yarn run lint && yarn run test",
26
- "prepublishOnly": "yarn run check",
27
- "download-latest-runtime-api": "ts-node ./scripts/downloadLatest.ts"
28
- },
29
- "peerDependencies": {
30
- "lua-types": "^2.11.0",
31
- "typescript-to-lua": "^1.0.0"
32
- },
33
- "devDependencies": {
34
- "@types/jest": "^27.0.3",
35
- "@types/node": "^16.11.12",
36
- "@types/prettier": "^2.4.2",
37
- "@typescript-eslint/eslint-plugin": "^5.6.0",
38
- "@typescript-eslint/parser": "^5.6.0",
39
- "chalk": "^3.0.0",
40
- "commander": "^8.3.0",
41
- "eslint": "^8.4.1",
42
- "eslint-config-prettier": "^8.3.0",
43
- "eslint-config-standard": "^16.0.3",
44
- "eslint-import-resolver-typescript": "^2.5.0",
45
- "eslint-plugin-import": "^2.25.3",
46
- "eslint-plugin-node": "^11.1.0",
47
- "eslint-plugin-prettier": "^4.0.0",
48
- "eslint-plugin-promise": "^5.2.0",
49
- "jest": "^27.4.3",
50
- "lua-types": "^2.11.0",
51
- "prettier": "^2.5.1",
52
- "prettier-plugin-jsdoc": "^0.3.30",
53
- "ts-jest": "^27.1.0",
54
- "ts-node": "^10.4.0",
55
- "typescript": "4.5.2",
56
- "typescript-to-lua": "^1.2.0"
57
- }
58
- }
1
+ {
2
+ "name": "typed-factorio",
3
+ "version": "0.16.0",
4
+ "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
+ "keywords": [
6
+ "factorio",
7
+ "types",
8
+ "typescript-to-lua",
9
+ "tstl"
10
+ ],
11
+ "repository": "https://github.com/GlassBricks/typed-factorio",
12
+ "license": "MIT",
13
+ "files": [
14
+ "**/*.d.ts"
15
+ ],
16
+ "homepage": "https://github.com/GlassBricks/typed-factorio#readme",
17
+ "scripts": {
18
+ "gen": "ts-node -P generator/tsconfig.json generator/main.ts",
19
+ "generate": "yarn run gen --in ./generatorSrc --out ./generated --warn-as-error",
20
+ "generate:dev": "yarn run gen --in ./generatorSrc --out ./generated --no-format",
21
+ "clean": "rimraf generated",
22
+ "pretest": "yarn run generate",
23
+ "test": "jest",
24
+ "lint": "eslint .",
25
+ "check": "yarn run lint && yarn run test",
26
+ "prepublishOnly": "yarn run check",
27
+ "download-latest-runtime-api": "ts-node ./scripts/downloadLatest.ts"
28
+ },
29
+ "peerDependencies": {
30
+ "lua-types": "^2.11.0",
31
+ "typescript-to-lua": "^1.3.1"
32
+ },
33
+ "devDependencies": {
34
+ "@types/jest": "^27.0.3",
35
+ "@types/node": "^16.11.12",
36
+ "@types/prettier": "^2.4.2",
37
+ "@typescript-eslint/eslint-plugin": "^5.6.0",
38
+ "@typescript-eslint/parser": "^5.6.0",
39
+ "chalk": "^3.0.0",
40
+ "commander": "^8.3.0",
41
+ "eslint": "^8.4.1",
42
+ "eslint-config-prettier": "^8.3.0",
43
+ "eslint-config-standard": "^16.0.3",
44
+ "eslint-import-resolver-typescript": "^2.5.0",
45
+ "eslint-plugin-import": "^2.25.3",
46
+ "eslint-plugin-node": "^11.1.0",
47
+ "eslint-plugin-prettier": "^4.0.0",
48
+ "eslint-plugin-promise": "^5.2.0",
49
+ "jest": "^27.4.3",
50
+ "lua-types": "^2.11.0",
51
+ "prettier": "^2.5.1",
52
+ "prettier-plugin-jsdoc": "^0.3.30",
53
+ "ts-jest": "^27.1.0",
54
+ "ts-node": "^10.4.0",
55
+ "typescript": "4.5.2",
56
+ "typescript-to-lua": "^1.3.1"
57
+ }
58
+ }
@@ -1,10 +1,10 @@
1
- /// <reference types="lua-types/5.2" />
2
-
3
- /// <reference path="../generated/index.d.ts" />
4
-
5
- /// <reference path="librariesAndFunctions.d.ts" />
6
- /// <reference path="pairs.d.ts" />
7
-
8
- // lualib
9
- /// <reference path="util.d.ts" />
10
- /// <reference path="mod-gui.d.ts" />
1
+ /// <reference types="lua-types/5.2" />
2
+
3
+ /// <reference path="../generated/index.d.ts" />
4
+
5
+ /// <reference path="librariesAndFunctions.d.ts" />
6
+ /// <reference path="pairs.d.ts" />
7
+
8
+ // lualib
9
+ /// <reference path="util.d.ts" />
10
+ /// <reference path="mod-gui.d.ts" />