typed-factorio 2.7.2 → 2.8.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 +22 -18
- package/prototype/generated/prototypes.d.ts +2417 -1790
- package/prototype/generated/types.d.ts +1437 -1437
- package/runtime/generated/builtin-types.d.ts +12 -12
- package/runtime/generated/classes.d.ts +3350 -3346
- package/runtime/generated/concepts.d.ts +236 -234
- package/runtime/generated/defines.d.ts +124 -124
- 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.8.0",
|
4
4
|
"description": "Featureful typescript definitions for the Factorio modding api.",
|
5
5
|
"keywords": [
|
6
6
|
"factorio",
|
@@ -8,7 +8,10 @@
|
|
8
8
|
"typescript-to-lua",
|
9
9
|
"tstl"
|
10
10
|
],
|
11
|
-
"repository":
|
11
|
+
"repository": {
|
12
|
+
"type": "git",
|
13
|
+
"url": "git+https://github.com/GlassBricks/typed-factorio.git"
|
14
|
+
},
|
12
15
|
"homepage": "https://github.com/GlassBricks/typed-factorio#readme",
|
13
16
|
"license": "MIT",
|
14
17
|
"files": [
|
@@ -19,41 +22,42 @@
|
|
19
22
|
"type": "module",
|
20
23
|
"packageManager": "npm@9.5.0",
|
21
24
|
"scripts": {
|
22
|
-
"generate": "
|
23
|
-
"generate-no-format": "
|
25
|
+
"generate": "tsx --tsconfig generator/tsconfig.json generator/main.ts",
|
26
|
+
"generate-no-format": "tsx --tsconfig generator/tsconfig.json generator/main.ts --no-format",
|
24
27
|
"clean": "rimraf runtime/generated prototype/generated",
|
25
28
|
"lint": "eslint .",
|
26
|
-
"check": "npm run lint",
|
29
|
+
"check": "tsc --noEmit && npm run lint",
|
27
30
|
"prepublishOnly": "npm run generate && npm run check",
|
28
|
-
"
|
29
|
-
"
|
31
|
+
"script": "tsx --tsconfig scripts/tsconfig.json",
|
32
|
+
"download-latest-json-apis": "npm run script ./scripts/download-latest.ts",
|
33
|
+
"new-version-changelog": "npm run script ./scripts/new-version-changelog.ts",
|
30
34
|
"next-factorio-version": "npm run download-latest-json-apis && npm run clean && npm run generate && npm run check && npm run new-version-changelog && npm version minor",
|
31
|
-
"next-factorio-version-diff": "
|
35
|
+
"next-factorio-version-diff": "npm run script ./scripts/new-version-diff.ts"
|
32
36
|
},
|
33
37
|
"peerDependencies": {
|
34
38
|
"lua-types": "^2.13.1",
|
35
39
|
"typescript-to-lua": "^1.10.0"
|
36
40
|
},
|
37
41
|
"devDependencies": {
|
38
|
-
"@swc/core": "^1.
|
42
|
+
"@swc/core": "^1.4.8",
|
39
43
|
"@types/download": "^8.0.5",
|
40
|
-
"@types/node": "^20.
|
41
|
-
"@typescript-eslint/eslint-plugin": "^
|
42
|
-
"@typescript-eslint/parser": "^
|
44
|
+
"@types/node": "^20.11.29",
|
45
|
+
"@typescript-eslint/eslint-plugin": "^7.3.0",
|
46
|
+
"@typescript-eslint/parser": "^7.3.0",
|
43
47
|
"chalk": "^5.3.0",
|
44
48
|
"download": "^8.0.0",
|
45
|
-
"eslint": "
|
49
|
+
"eslint": "^8.57.0",
|
46
50
|
"eslint-config-prettier": "^9.1.0",
|
47
51
|
"eslint-import-resolver-typescript": "^3.6.1",
|
48
52
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
49
53
|
"eslint-plugin-import": "^2.29.1",
|
50
54
|
"eslint-plugin-node": "^11.1.0",
|
51
|
-
"eslint-plugin-prettier": "^5.1.
|
55
|
+
"eslint-plugin-prettier": "^5.1.3",
|
52
56
|
"lua-types": "^2.13.1",
|
53
|
-
"prettier": "^3.
|
57
|
+
"prettier": "^3.2.5",
|
54
58
|
"rimraf": "^5.0.5",
|
55
|
-
"
|
56
|
-
"typescript": "~5.
|
57
|
-
"typescript-to-lua": "^1.
|
59
|
+
"tsx": "^4.7.1",
|
60
|
+
"typescript": "~5.4.2",
|
61
|
+
"typescript-to-lua": "^1.25.0"
|
58
62
|
}
|
59
63
|
}
|