typed-factorio 1.16.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +95 -53
- package/common/data-global.d.ts +15 -0
- package/common/serpent.d.ts +93 -0
- package/common/settings-global.d.ts +8 -0
- package/common/types.d.ts +74 -0
- package/index.d.ts +26 -0
- package/lualib/index.d.ts +2 -0
- package/{runtime → lualib}/mod-gui.d.ts +1 -0
- package/{runtime → lualib}/util.d.ts +69 -38
- package/package.json +25 -28
- package/prototype/generated/prototypes.d.ts +12821 -0
- package/prototype/generated/types.d.ts +11985 -0
- package/prototype/index.d.ts +11 -0
- package/runtime/generated/builtin-types.d.ts +59 -64
- package/runtime/generated/classes.d.ts +25770 -24456
- package/runtime/generated/concepts.d.ts +8551 -9109
- package/runtime/generated/defines.d.ts +2084 -1872
- package/runtime/generated/events.d.ts +4197 -4382
- package/runtime/generated/global-functions.d.ts +30 -28
- package/runtime/generated/global-objects.d.ts +42 -41
- package/runtime/generated/index-types.d.ts +51 -50
- package/runtime/index.d.ts +8 -16
- package/runtime/pairs.d.ts +9 -7
- package/settings/index.d.ts +10 -0
- package/settings/types.d.ts +103 -112
- package/custom-index-template.d.ts +0 -23
- package/data/types.d.ts +0 -13
- package/runtime/librariesAndFunctions.d.ts +0 -91
- package/strict-index-types.d.ts +0 -3
@@ -1,91 +0,0 @@
|
|
1
|
-
// from https://lua-api.factorio.com/latest/Libraries.html
|
2
|
-
// last updated for 1.1.35, 1.1.36, 1.1.37
|
3
|
-
|
4
|
-
/** @noSelfInFile */
|
5
|
-
|
6
|
-
/** @noSelf */
|
7
|
-
interface SerpentOptions {
|
8
|
-
/** Indentation; triggers long multi-line output. */
|
9
|
-
indent: string
|
10
|
-
/** Provide stringified value in a comment (up to maxlevel of depth). */
|
11
|
-
comment: boolean | number
|
12
|
-
/** Sort keys. */
|
13
|
-
sortkeys: boolean | ((this: void, keys: any[], table: any) => void)
|
14
|
-
/** Force sparse encoding (no nil filling based on #t). */
|
15
|
-
sparse: boolean
|
16
|
-
/** Remove spaces. */
|
17
|
-
compact: boolean
|
18
|
-
/** Raise fatal error on non-serializable values. */
|
19
|
-
fatal: boolean
|
20
|
-
/** Disable bytecode serialization for easy comparison. */
|
21
|
-
nocode: boolean
|
22
|
-
/** Disable checking numbers against undefined and huge values. */
|
23
|
-
nohuge: boolean
|
24
|
-
/** Specify max level up to which to expand nested tables. */
|
25
|
-
maxlevel: number
|
26
|
-
/** Specify max number of elements in a table. */
|
27
|
-
maxnum: number
|
28
|
-
/** Specify max length for all table elements. */
|
29
|
-
maxlength: number
|
30
|
-
/**
|
31
|
-
* Use __tostring metamethod when serializing tables (v0.29); set to false to disable and serialize the table as is,
|
32
|
-
* even when __tostring is present.
|
33
|
-
*/
|
34
|
-
metatostring: boolean
|
35
|
-
/**
|
36
|
-
* Specify format for numeric values as shortest possible round-trippable double (v0.30). Use "%.16g" for better
|
37
|
-
* readability and "%.17g" (the default value) to preserve floating point precision.
|
38
|
-
*/
|
39
|
-
numformat: string
|
40
|
-
/** Allows to specify a list of values to ignore (as keys). */
|
41
|
-
valignore: string[]
|
42
|
-
/** Allows to specify the list of keys to be serialized. Any keys not in this list are not included in final output (as keys). */
|
43
|
-
keyallow: string[]
|
44
|
-
/** Allows to specity the list of keys to ignore in serialization. */
|
45
|
-
keyignore: string[]
|
46
|
-
/** Allows to specify a list of value types to ignore (as keys). */
|
47
|
-
valtypeignore: string[]
|
48
|
-
/** Provide custom output for tables. */
|
49
|
-
custom(opts: {
|
50
|
-
/** The name of the current element with '=' or an empty string in case of array index, */
|
51
|
-
tag: string
|
52
|
-
/** An opening table bracket { and associated indentation and newline (if any), */
|
53
|
-
head: string
|
54
|
-
/** Table elements concatenated into a string using commas and indentation/newlines (if any), */
|
55
|
-
body: string
|
56
|
-
/** A closing table bracket } and associated indentation and newline (if any), and */
|
57
|
-
tail: string
|
58
|
-
/** The current level. */
|
59
|
-
level: number
|
60
|
-
}): string
|
61
|
-
/** Name; triggers full serialization with self-ref section. */
|
62
|
-
name: string
|
63
|
-
|
64
|
-
refcomment: boolean | number
|
65
|
-
tablecomment: boolean | number
|
66
|
-
}
|
67
|
-
|
68
|
-
/**
|
69
|
-
* Factorio provides the {@link https://github.com/pkulchenko/serpent serpent library} as a global variable `serpent` for
|
70
|
-
* all mods to use. It allows for easy debugging of tables, because serpent makes it trivial to print them, for example
|
71
|
-
* by using `serpent.block()`. However, serpent cannot pretty-print LuaObjects such as LuaEntity. The serpent library
|
72
|
-
* was modified to improve determinism, e.g. comments are turned off by default to avoid returning table addresses.
|
73
|
-
* Furthermore, two options were added: `refcomment` (true/false/maxlevel) and `tablecomment` (true/false/maxlevel),
|
74
|
-
* which allow to separately control the self-reference and table value output of the `comment` option.
|
75
|
-
*/
|
76
|
-
declare namespace serpent {
|
77
|
-
/** Full serialization; sets name, compact and sparse options; */
|
78
|
-
function dump(tbl: unknown, options?: Partial<SerpentOptions>): string
|
79
|
-
|
80
|
-
/** Single line pretty printing, no self-ref section; sets sortkeys and comment options; */
|
81
|
-
function line(tbl: unknown, options?: Partial<SerpentOptions>): string
|
82
|
-
|
83
|
-
/** Multi-line indented pretty printing, no self-ref section; sets indent, sortkeys, and comment options. */
|
84
|
-
function block(tbl: unknown, options?: Partial<SerpentOptions>): string
|
85
|
-
|
86
|
-
/**
|
87
|
-
* For loading serialized fragments, serpent also provides `load` function that adds safety checks and reports an
|
88
|
-
* error if there is any executable code in the fragment.
|
89
|
-
*/
|
90
|
-
function load<T>(str: string, options?: { safe?: boolean }): LuaMultiReturn<[true, T] | [false, string]>
|
91
|
-
}
|
package/strict-index-types.d.ts
DELETED