typed-factorio 3.33.0 → 3.36.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.
@@ -4,7 +4,7 @@
4
4
  * This is only available in the settings or prototype stage.
5
5
  * Only prototypes for the current stage can be accessed.
6
6
  */
7
- declare const data: import("factorio:common").DataGlobal
7
+ declare const data: import("factorio:prototype").Data
8
8
 
9
9
  /**
10
10
  * A table of (mod name -> mod version) for all currently active mods.
package/common/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /** @noResolution */
2
2
  declare module "factorio:common" {
3
- import { ModSetting, LuaBootstrap } from "factorio:runtime"
4
- import { Data } from "factorio:prototype"
3
+ import { Data, PrototypeMap } from "factorio:prototype"
4
+ import { LuaBootstrap, ModSetting } from "factorio:runtime"
5
5
  import { SettingsPrototypeMap } from "factorio:settings"
6
6
  /**
7
7
  * A type map of type name -> prototype type.
@@ -16,28 +16,9 @@ declare module "factorio:common" {
16
16
  readonly name: string
17
17
  }
18
18
 
19
- /**
20
- * See {@link Data} for documentation.
21
- */
22
- export interface DataGlobal<M = GlobalPrototypeMap> {
23
- /**
24
- * A table of the already added prototypes.
25
- * Indexed by prototype type, then by prototype name.
26
- */
27
- readonly raw: {
28
- readonly [type in keyof M]: {
29
- readonly [name in string]?: M[type]
30
- }
31
- }
32
-
33
- extend<P extends AnyPrototype<M>>(prototypes: readonly P[]): void
34
-
35
- is_demo: boolean
36
- }
37
-
38
19
  export interface SettingsGlobal {
39
20
  readonly startup: {
40
- readonly [name: string]: ModSetting
21
+ [name: string]: ModSetting
41
22
  }
42
23
  }
43
24
 
@@ -61,7 +42,7 @@ declare module "factorio:common" {
61
42
  * data.extend(...)
62
43
  * ```
63
44
  */
64
- export type PrototypeData = Data
45
+ export type PrototypeData = Data<PrototypeMap>
65
46
 
66
47
  /**
67
48
  * Represents the `data` global variable for the settings stage.
@@ -74,7 +55,7 @@ declare module "factorio:common" {
74
55
  * data.extend(...)
75
56
  * ```
76
57
  */
77
- export type SettingsData = DataGlobal<SettingsPrototypeMap>
58
+ export type SettingsData = Data<SettingsPrototypeMap>
78
59
 
79
60
  /**
80
61
  * You can optionally extend this interface to provide type checking and autocompletion for custom input names, like so:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "3.33.0",
3
+ "version": "3.36.0",
4
4
  "description": "Featureful typescript definitions for the Factorio modding api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -62,5 +62,5 @@
62
62
  "typescript": "~5.4.2",
63
63
  "typescript-to-lua": "^1.25.0"
64
64
  },
65
- "factorioVersion": "2.0.72"
65
+ "factorioVersion": "2.0.75"
66
66
  }