typed-factorio 2.7.4 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -0
- package/common/types.d.ts +3 -3
- package/package.json +11 -11
- package/prototype/generated/prototypes.d.ts +2468 -1828
- package/prototype/generated/types.d.ts +1553 -1495
- package/runtime/generated/builtin-types.d.ts +12 -12
- package/runtime/generated/classes.d.ts +3818 -3610
- package/runtime/generated/concepts.d.ts +253 -247
- package/runtime/generated/defines.d.ts +126 -126
- package/runtime/generated/events.d.ts +185 -185
- package/runtime/generated/global-functions.d.ts +3 -3
- package/runtime/generated/global-objects.d.ts +6 -6
- package/settings/types.d.ts +2 -0
package/README.md
CHANGED
@@ -200,3 +200,12 @@ function isCraftingMachineEntity(entity: BaseEntity): entity is CraftingMachineE
|
|
200
200
|
Similarly, `GuiSpec` (the table passed to `LuaGuiElement.add`), is also a discriminated union. The type for a specific GuiSpec is `<Type>GuiSpec`, e.g. `ListBoxGuiSpec`. `LuaGuiElement.add` will return the appropriate gui element type corresponding to the GuiSpec type passed in.
|
201
201
|
|
202
202
|
This is done both to provide more accurate types, and for possible integration with [JSX](https://typescripttolua.github.io/docs/jsx/).
|
203
|
+
|
204
|
+
|
205
|
+
## Support
|
206
|
+
|
207
|
+
If you find this project useful, consider tipping me on Kofi!
|
208
|
+
|
209
|
+
<a href='https://ko-fi.com/Z8Z1VI6P8' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
210
|
+
|
211
|
+
|
package/common/types.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
declare module "factorio:common" {
|
3
3
|
import { ModSetting } from "factorio:runtime"
|
4
4
|
import { Data } from "factorio:prototype"
|
5
|
-
import {
|
5
|
+
import { SettingsPrototypeMap } from "factorio:settings"
|
6
6
|
/**
|
7
7
|
* A type map of type name -> prototype type.
|
8
8
|
*
|
@@ -49,7 +49,7 @@ declare module "factorio:common" {
|
|
49
49
|
}
|
50
50
|
|
51
51
|
/**
|
52
|
-
* Represents
|
52
|
+
* Represents the `data` global variable for the prototype stage.
|
53
53
|
*
|
54
54
|
* If you did _not_ add `"typed-factorio/prototype"` to your tsconfig, you can manually declare this global like so:
|
55
55
|
* ```ts
|
@@ -62,7 +62,7 @@ declare module "factorio:common" {
|
|
62
62
|
export type PrototypeData = Data
|
63
63
|
|
64
64
|
/**
|
65
|
-
* Represents
|
65
|
+
* Represents the `data` global variable for the settings stage.
|
66
66
|
*
|
67
67
|
* If you did _not_ add `"typed-factorio/settings"` to your tsconfig, you can manually declare this global like so:
|
68
68
|
* ```ts
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "typed-factorio",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.9.0",
|
4
4
|
"description": "Featureful typescript definitions for the Factorio modding api.",
|
5
5
|
"keywords": [
|
6
6
|
"factorio",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"generate-no-format": "tsx --tsconfig generator/tsconfig.json generator/main.ts --no-format",
|
27
27
|
"clean": "rimraf runtime/generated prototype/generated",
|
28
28
|
"lint": "eslint .",
|
29
|
-
"check": "npm run lint",
|
29
|
+
"check": "tsc --noEmit && npm run lint",
|
30
30
|
"prepublishOnly": "npm run generate && npm run check",
|
31
31
|
"script": "tsx --tsconfig scripts/tsconfig.json",
|
32
32
|
"download-latest-json-apis": "npm run script ./scripts/download-latest.ts",
|
@@ -39,14 +39,14 @@
|
|
39
39
|
"typescript-to-lua": "^1.10.0"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
|
-
"@swc/core": "^1.
|
42
|
+
"@swc/core": "^1.4.8",
|
43
43
|
"@types/download": "^8.0.5",
|
44
|
-
"@types/node": "^20.11.
|
45
|
-
"@typescript-eslint/eslint-plugin": "^
|
46
|
-
"@typescript-eslint/parser": "^
|
44
|
+
"@types/node": "^20.11.29",
|
45
|
+
"@typescript-eslint/eslint-plugin": "^7.3.0",
|
46
|
+
"@typescript-eslint/parser": "^7.3.0",
|
47
47
|
"chalk": "^5.3.0",
|
48
48
|
"download": "^8.0.0",
|
49
|
-
"eslint": "
|
49
|
+
"eslint": "^8.57.0",
|
50
50
|
"eslint-config-prettier": "^9.1.0",
|
51
51
|
"eslint-import-resolver-typescript": "^3.6.1",
|
52
52
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
@@ -54,10 +54,10 @@
|
|
54
54
|
"eslint-plugin-node": "^11.1.0",
|
55
55
|
"eslint-plugin-prettier": "^5.1.3",
|
56
56
|
"lua-types": "^2.13.1",
|
57
|
-
"prettier": "^3.2.
|
57
|
+
"prettier": "^3.2.5",
|
58
58
|
"rimraf": "^5.0.5",
|
59
|
-
"tsx": "^4.7.
|
60
|
-
"typescript": "~5.
|
61
|
-
"typescript-to-lua": "^1.
|
59
|
+
"tsx": "^4.7.1",
|
60
|
+
"typescript": "~5.4.2",
|
61
|
+
"typescript-to-lua": "^1.25.0"
|
62
62
|
}
|
63
63
|
}
|