typed-factorio 2.13.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -107,14 +107,15 @@ const foo = util.copy(bar)
107
107
 
108
108
  If you wish to see types for more lualib modules, feel free to open an issue or pull request.
109
109
 
110
- ### The `global` table
110
+ ### The `storage` table
111
111
 
112
- The `global` table (in the runtime stage) can have any shape, so it is not defined here. Instead, you can define it yourself:
112
+ The `storage` table (in the runtime stage) can have any shape, so it is not defined here. Instead, you can define it yourself:
113
113
 
114
- - Add `declare const global: <Your type>` in a `.d.ts` file included in your project, to apply it project-wide.
115
- - Add `declare const global: {...}` to each file where needed. This way, you can define only properties that each file specifically uses.
114
+ - Add `declare const storage: <Your type>` in a `.d.ts` file. Make sure this file is included by your tsconfig!
115
+ - Add `declare global { const storage: <Your type> }` in a `.ts` file included in your project.
116
+ - Add `declare const storage: {...}` to each file where needed. This way, you can define only properties that each file specifically uses.
116
117
 
117
- ## Using multiple stages in the same project
118
+ ## Using multiple loading stages in the same project
118
119
 
119
120
  Every Factorio loading stage declares different global variables.
120
121
  To add types for multiple Factorio stages, you have a few options:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "2.13.0",
3
+ "version": "3.0.0",
4
4
  "description": "Featureful typescript definitions for the Factorio modding api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -46,7 +46,6 @@
46
46
  "@types/node": "^20.11.29",
47
47
  "@typescript-eslint/eslint-plugin": "^7.3.0",
48
48
  "@typescript-eslint/parser": "^7.3.0",
49
- "chalk": "^5.3.0",
50
49
  "download": "^8.0.0",
51
50
  "eslint": "^8.57.0",
52
51
  "eslint-config-prettier": "^9.1.0",