typed-factorio 0.19.1 → 0.20.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,52 @@
1
+ // This is an auto-generated file. Do not edit directly!
2
+
3
+ /** @noSelfInFile */
4
+
5
+ /**
6
+ * See {@link LuaPlayer#index LuaPlayer.index}.
7
+ *
8
+ * If you need to use a number/numeric literal for this type, you can use a cast, e.g. `2 as PlayerIndex`.
9
+ */
10
+ type PlayerIndex =
11
+ | (uint & {
12
+ _playerIndexBrand: void
13
+ })
14
+ | 1
15
+
16
+ /**
17
+ * See {@link LuaSurface#index LuaSurface.index}.
18
+ *
19
+ * If you need to use a number/numeric literal for this type, you can use a cast, e.g. `2 as SurfaceIndex`.
20
+ */
21
+ type SurfaceIndex =
22
+ | (uint & {
23
+ _surfaceIndexBrand: void
24
+ })
25
+ | 1
26
+
27
+ /**
28
+ * See {@link LuaEntity#unit_number LuaEntity.unit_number}.
29
+ *
30
+ * If you need to use a number/numeric literal for this type, you can use a cast, e.g. `2 as UnitNumber`.
31
+ */
32
+ type UnitNumber = uint & {
33
+ _unitNumberBrand: void
34
+ }
35
+
36
+ /**
37
+ * See {@link LuaGuiElement#index LuaGuiElement.index}.
38
+ *
39
+ * If you need to use a number/numeric literal for this type, you can use a cast, e.g. `2 as GuiElementIndex`.
40
+ */
41
+ type GuiElementIndex = uint & {
42
+ _guiElementIndexBrand: void
43
+ }
44
+
45
+ /**
46
+ * See {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap.register_on_entity_destroyed}.
47
+ *
48
+ * If you need to use a number/numeric literal for this type, you can use a cast, e.g. `2 as RegistrationNumber`.
49
+ */
50
+ type RegistrationNumber = uint64 & {
51
+ _registrationNumberBrand: void
52
+ }
@@ -0,0 +1,38 @@
1
+ // This is an auto-generated file. Do not edit directly!
2
+
3
+ /** @noSelfInFile */
4
+
5
+ /**
6
+ * See {@link LuaPlayer#index LuaPlayer.index}..
7
+ *
8
+ * This can be a "branded" type for stricter types; see docs on how to opt-in to this.
9
+ */
10
+ type PlayerIndex = uint
11
+
12
+ /**
13
+ * See {@link LuaSurface#index LuaSurface.index}..
14
+ *
15
+ * This can be a "branded" type for stricter types; see docs on how to opt-in to this.
16
+ */
17
+ type SurfaceIndex = uint
18
+
19
+ /**
20
+ * See {@link LuaEntity#unit_number LuaEntity.unit_number}..
21
+ *
22
+ * This can be a "branded" type for stricter types; see docs on how to opt-in to this.
23
+ */
24
+ type UnitNumber = uint
25
+
26
+ /**
27
+ * See {@link LuaGuiElement#index LuaGuiElement.index}..
28
+ *
29
+ * This can be a "branded" type for stricter types; see docs on how to opt-in to this.
30
+ */
31
+ type GuiElementIndex = uint
32
+
33
+ /**
34
+ * See {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap.register_on_entity_destroyed}..
35
+ *
36
+ * This can be a "branded" type for stricter types; see docs on how to opt-in to this.
37
+ */
38
+ type RegistrationNumber = uint64
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "0.19.1",
3
+ "version": "0.20.0-beta.1",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -15,9 +15,7 @@
15
15
  ],
16
16
  "homepage": "https://github.com/GlassBricks/typed-factorio#readme",
17
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",
18
+ "generate": "ts-node -P generator/tsconfig.json generator/main.ts",
21
19
  "clean": "rimraf generated",
22
20
  "pretest": "yarn run generate",
23
21
  "test": "jest",
@@ -37,7 +35,6 @@
37
35
  "@typescript-eslint/eslint-plugin": "^5.6.0",
38
36
  "@typescript-eslint/parser": "^5.6.0",
39
37
  "chalk": "^3.0.0",
40
- "commander": "^8.3.0",
41
38
  "eslint": "^8.4.1",
42
39
  "eslint-config-prettier": "^8.3.0",
43
40
  "eslint-config-standard": "^16.0.3",
@@ -1,7 +1,15 @@
1
1
  /// <reference types="lua-types/5.2" />
2
2
 
3
- /// <reference path="../generated/index.d.ts" />
3
+ // generated
4
+ /// <reference path="../generated/builtin-types.d.ts" />
5
+ /// <reference path="../generated/global-objects.d.ts" />
6
+ /// <reference path="../generated/defines.d.ts" />
7
+ /// <reference path="../generated/events.d.ts" />
8
+ /// <reference path="../generated/classes.d.ts" />
9
+ /// <reference path="../generated/concepts.d.ts" />
10
+ /// <reference path="../generated/index-types.d.ts" />
4
11
 
12
+ // other runtime
5
13
  /// <reference path="librariesAndFunctions.d.ts" />
6
14
  /// <reference path="pairs.d.ts" />
7
15
 
@@ -1,4 +1,5 @@
1
1
  /** @noSelfInFile */
2
+ ///<reference types="lua-types/5.2" />
2
3
 
3
4
  /**
4
5
  * Iterating with `pairs` will only iterate the array part of a {@link LuaCustomTable}.
@@ -0,0 +1,18 @@
1
+ /// <reference types="lua-types/5.2" />
2
+
3
+ // generated
4
+ /// <reference path="../generated/builtin-types.d.ts" />
5
+ /// <reference path="../generated/global-objects.d.ts" />
6
+ /// <reference path="../generated/defines.d.ts" />
7
+ /// <reference path="../generated/events.d.ts" />
8
+ /// <reference path="../generated/classes.d.ts" />
9
+ /// <reference path="../generated/concepts.d.ts" />
10
+ /// <reference path="../generated/index-types-strict.d.ts" />
11
+
12
+ // other runtime
13
+ /// <reference path="librariesAndFunctions.d.ts" />
14
+ /// <reference path="pairs.d.ts" />
15
+
16
+ // lualib
17
+ /// <reference path="util.d.ts" />
18
+ /// <reference path="mod-gui.d.ts" />
@@ -1,9 +0,0 @@
1
- // This is an auto-generated file. Do not edit directly!
2
-
3
- ///<reference types="lua-types/5.2" />
4
- ///<reference path="builtin-types.d.ts" />
5
- ///<reference path="global-objects.d.ts" />
6
- ///<reference path="defines.d.ts" />
7
- ///<reference path="events.d.ts" />
8
- ///<reference path="classes.d.ts" />
9
- ///<reference path="concepts.d.ts" />