@defold-typescript/library-types 0.22.0 → 0.24.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.
- package/api-doc/boom.json +3870 -0
- package/api-doc/{bridge.bridge.json → bridge.json} +754 -844
- package/api-doc/bzAnim.json +338 -0
- package/api-doc/decore.json +23 -23
- package/api-doc/defcon.json +150 -0
- package/api-doc/{defmath.defmath.json → defmath.json} +6 -46
- package/api-doc/defsave.json +518 -0
- package/api-doc/deftest.json +741 -0
- package/api-doc/{dicebag.dicebag.json → dicebag.json} +19 -1
- package/api-doc/druid.json +249 -1846
- package/api-doc/event.json +1074 -0
- package/api-doc/gooey.json +2050 -0
- package/api-doc/immutable.json +65 -0
- package/api-doc/in.accelerometer.json +75 -1
- package/api-doc/in.button.json +17 -10
- package/api-doc/in.cursor.json +26 -0
- package/api-doc/in.gesture.json +401 -6
- package/api-doc/in.keyboard.json +2 -0
- package/api-doc/in.mapper.json +12 -8
- package/api-doc/in.onscreen.json +61 -5
- package/api-doc/in.state.json +61 -13
- package/api-doc/in.textbox.json +23 -12
- package/api-doc/in.triggers.json +336 -0
- package/api-doc/lang.json +528 -0
- package/api-doc/{event.event.json → log.json} +96 -101
- package/api-doc/metrics.fps.json +61 -2
- package/api-doc/metrics.mem.json +61 -2
- package/api-doc/monarch.monarch.json +249 -7
- package/api-doc/monarch.transitions.easings.json +19 -26
- package/api-doc/monarch.transitions.gui.json +782 -79
- package/api-doc/nakama.engine.defold.json +31 -18
- package/api-doc/{nakama.nakama.json → nakama.json} +4752 -2554
- package/api-doc/nakama.util.log.json +32 -4
- package/api-doc/narrator.json +647 -0
- package/api-doc/openapi/nakama.nakama.json +7680 -0
- package/api-doc/orthographic.camera.json +96 -98
- package/api-doc/orthographic.json +602 -0
- package/api-doc/panthera.json +1183 -0
- package/api-doc/{persist.persist.json → persist.json} +26 -1
- package/api-doc/{platypus.platypus.json → platypus.json} +68 -14
- package/api-doc/proto.json +995 -0
- package/api-doc/{rendy.rendy.json → rendy.json} +46 -99
- package/api-doc/richtext.color.json +77 -0
- package/api-doc/richtext.richtext.json +375 -5
- package/api-doc/saver.saver.json +714 -263
- package/api-doc/saver.storage.json +283 -52
- package/api-doc/squid.json +846 -0
- package/api-doc/{starly.starly.json → starly.json} +1 -1
- package/api-doc/tweener.json +277 -0
- package/api-doc/{yagames.yagames.json → yagames.json} +784 -189
- package/api-doc/{zzfx.api.json → zzfx.json} +9 -9
- package/authored-targets.json +403 -0
- package/generated/{boom.boom.d.ts → boom.d.ts} +14 -0
- package/generated/bridge.d.ts +468 -0
- package/generated/{bzAnim.bzLibrary.d.ts → bzAnim.d.ts} +6 -0
- package/generated/decore.d.ts +37 -37
- package/generated/defcon.d.ts +43 -0
- package/generated/{defmath.defmath.d.ts → defmath.d.ts} +3 -2
- package/generated/defsave.d.ts +144 -0
- package/generated/{dicebag.dicebag.d.ts → dicebag.d.ts} +25 -0
- package/generated/druid.d.ts +198 -502
- package/generated/event.d.ts +318 -0
- package/generated/{gooey.gooey.d.ts → gooey.d.ts} +61 -6
- package/generated/immutable.d.ts +13 -0
- package/generated/in.onscreen.d.ts +5 -0
- package/generated/in.textbox.d.ts +4 -0
- package/generated/lang.d.ts +101 -0
- package/generated/log.d.ts +36 -0
- package/generated/metrics.fps.d.ts +19 -1
- package/generated/metrics.mem.d.ts +19 -1
- package/generated/monarch.monarch.d.ts +44 -1
- package/generated/monarch.transitions.easings.d.ts +0 -1
- package/generated/monarch.transitions.gui.d.ts +96 -12
- package/generated/nakama.d.ts +1158 -0
- package/generated/nakama.engine.defold.d.ts +3 -1
- package/generated/nakama.util.log.d.ts +6 -0
- package/generated/narrator.d.ts +121 -0
- package/generated/openapi/nakama.nakama.d.ts +884 -0
- package/generated/orthographic.camera.d.ts +24 -38
- package/generated/orthographic.d.ts +155 -0
- package/generated/panthera.d.ts +170 -0
- package/generated/{persist.persist.d.ts → persist.d.ts} +3 -0
- package/generated/{platypus.platypus.d.ts → platypus.d.ts} +9 -0
- package/generated/proto.d.ts +146 -0
- package/generated/{rendy.rendy.d.ts → rendy.d.ts} +33 -80
- package/generated/richtext.color.d.ts +15 -0
- package/generated/saver.saver.d.ts +289 -42
- package/generated/saver.storage.d.ts +79 -14
- package/generated/squid.d.ts +127 -0
- package/generated/tweener.d.ts +42 -0
- package/generated/{yagames.yagames.d.ts → yagames.d.ts} +151 -29
- package/generated/{zzfx.api.d.ts → zzfx.d.ts} +7 -0
- package/library-classification.json +0 -227
- package/library-targets.json +1 -284
- package/luals-targets.json +168 -1
- package/openapi-targets.json +17 -0
- package/package.json +9 -88
- package/script-api-targets.json +15 -0
- package/scripts/__snapshots__/parse-luals.test.ts.snap +504 -85
- package/scripts/apply-luals-overrides.ts +95 -0
- package/scripts/authored-parity.ts +718 -0
- package/scripts/emit-library-dts.ts +177 -19
- package/scripts/extract-api-doc.ts +189 -38
- package/scripts/fidelity-floor.ts +178 -0
- package/scripts/import-upstream-docs.ts +125 -0
- package/scripts/lower-api-doc.ts +69 -19
- package/scripts/luals-fidelity.ts +22 -10
- package/scripts/map-luals-types.ts +86 -22
- package/scripts/parse-lua-surface.ts +187 -0
- package/scripts/parse-luals.ts +473 -22
- package/scripts/parse-markdown-api.ts +247 -0
- package/scripts/parse-openapi-api.ts +313 -0
- package/scripts/sync-authored-types.ts +249 -0
- package/scripts/sync-library-types.ts +99 -3
- package/scripts/sync-luals-types.ts +29 -2
- package/scripts/sync-markdown-types.ts +761 -0
- package/scripts/sync-openapi-types.ts +308 -0
- package/scripts/sync-script-api-types.ts +367 -0
- package/api-doc/boom.boom.json +0 -26
- package/api-doc/bzAnim.bzLibrary.json +0 -156
- package/api-doc/defcon.console.json +0 -109
- package/api-doc/defsave.defsave.json +0 -175
- package/api-doc/deftest.deftest.json +0 -71
- package/api-doc/gooey.gooey.json +0 -963
- package/api-doc/immutable.immutable.json +0 -63
- package/api-doc/lang.lang.json +0 -411
- package/api-doc/log.log.json +0 -50
- package/api-doc/narrator.narrator.json +0 -150
- package/api-doc/proto.proto.json +0 -355
- package/api-doc/squid.squid.json +0 -660
- package/api-doc/tweener.tweener.json +0 -419
- package/generated/bridge.bridge.d.ts +0 -533
- package/generated/defcon.console.d.ts +0 -24
- package/generated/defsave.defsave.d.ts +0 -31
- package/generated/event.event.d.ts +0 -54
- package/generated/immutable.immutable.d.ts +0 -13
- package/generated/lang.lang.d.ts +0 -33
- package/generated/log.log.d.ts +0 -40
- package/generated/nakama.nakama.d.ts +0 -594
- package/generated/narrator.narrator.d.ts +0 -66
- package/generated/proto.proto.d.ts +0 -36
- package/generated/squid.squid.d.ts +0 -106
- package/generated/tweener.tweener.d.ts +0 -151
- /package/generated/{deftest.deftest.d.ts → deftest.d.ts} +0 -0
- /package/generated/{starly.starly.d.ts → starly.d.ts} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defcon|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'defcon.console' {
|
|
8
|
+
/** @noSelf */
|
|
9
|
+
export interface CommandCallback {
|
|
10
|
+
(args: Array<string>, stream: unknown): string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The engine's own `print`, captured at load. `start()` replaces the global with a
|
|
15
|
+
* logging wrapper that calls this, and `stop()` restores the global from it.
|
|
16
|
+
*/
|
|
17
|
+
export const print: (...args: unknown[]) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The engine's own `pprint`, captured at load. `start()` replaces the global with a
|
|
21
|
+
* logging wrapper that calls this, and `stop()` restores the global from it.
|
|
22
|
+
*/
|
|
23
|
+
export const pprint: (...args: unknown[]) => void;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The `defnet` http_server the console listens on. A router-only stand-in until
|
|
27
|
+
* `start()` creates the real one; opaque here, `defnet` not being vendored by this
|
|
28
|
+
* target.
|
|
29
|
+
*/
|
|
30
|
+
export const server: unknown;
|
|
31
|
+
|
|
32
|
+
export function start(port: number): void;
|
|
33
|
+
|
|
34
|
+
export function stop(): void;
|
|
35
|
+
|
|
36
|
+
export function update(): void;
|
|
37
|
+
|
|
38
|
+
export function register_module(module: unknown, name?: string): void;
|
|
39
|
+
|
|
40
|
+
export function register_command(command: string, description: string, callback: CommandCallback): void;
|
|
41
|
+
|
|
42
|
+
export function set_environment(env: unknown): void;
|
|
43
|
+
}
|
|
@@ -179,11 +179,12 @@ declare module "defmath.defmath" {
|
|
|
179
179
|
/**
|
|
180
180
|
* Used to find a point in a triangle
|
|
181
181
|
* x0, y0 are the points that are being checked against the rest to see if it's inside
|
|
182
|
+
* arr must be 6 in length: top x/y, bottom right x/y, bottom left x/y
|
|
182
183
|
*/
|
|
183
|
-
export function in_triangle(x0: number, y0: number,
|
|
184
|
+
export function in_triangle(x0: number, y0: number, arr: [number, number, number, number, number, number]): boolean;
|
|
184
185
|
|
|
185
186
|
/**
|
|
186
|
-
*
|
|
187
|
+
* box intersection of 2 square
|
|
187
188
|
*/
|
|
188
189
|
export function box_intersect(ax: number, ay: number, awidth: number, aheight: number, bx: number, by: number, bwidth: number, bheight: number): boolean;
|
|
189
190
|
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Save and load config and user data persistently between a Defold project's sessions
|
|
5
|
+
* @see {@link https://github.com/subsoap/defsave|Github Source}
|
|
6
|
+
* @noResolution
|
|
7
|
+
*/
|
|
8
|
+
declare module "defsave.defsave" {
|
|
9
|
+
/**
|
|
10
|
+
* Set to true to autosave all loaded files that are changed on a timer
|
|
11
|
+
*/
|
|
12
|
+
export let autosave: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Amount of seconds between autosaves if changes have been made
|
|
16
|
+
*/
|
|
17
|
+
export let autosave_timer: number;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Current timer value, only increases if autosave is enabled
|
|
21
|
+
*/
|
|
22
|
+
export let timer: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Locally used but can be useful to have exposed
|
|
26
|
+
*/
|
|
27
|
+
export let changed: boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* If true then more information will be printed, such as autosaves
|
|
31
|
+
*/
|
|
32
|
+
export let verbose: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* If true then files already loaded will never be overwritten with a reload
|
|
36
|
+
*/
|
|
37
|
+
export let block_reloading: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Determines part of the path for saving files to
|
|
41
|
+
*/
|
|
42
|
+
export let appname: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* List of files currently loaded
|
|
46
|
+
*/
|
|
47
|
+
export let loaded: LuaMap<string, unknown>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* System information captured at module load
|
|
51
|
+
*/
|
|
52
|
+
export let sysinfo: ReturnType<typeof sys.get_sys_info>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* If true will attempt to load default data from the default_data table when loading an empty file
|
|
56
|
+
*/
|
|
57
|
+
export let use_default_data: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* If true then all data saved and loaded will be encrypted with AES - SLOWER
|
|
61
|
+
*/
|
|
62
|
+
export let enable_encryption: boolean;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Pick an encryption key to use if you're using encryption
|
|
66
|
+
*/
|
|
67
|
+
export let encryption_key: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* If true then all data saved and loaded will be XOR obfuscated - FASTER
|
|
71
|
+
*/
|
|
72
|
+
export let enable_obfuscation: boolean;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Pick an obfuscation key to use if you're using obfuscation; the longer the key the better
|
|
76
|
+
*/
|
|
77
|
+
export let obfuscation_key: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* If true then data is serialized with sys.serialize rather than encoded as JSON
|
|
81
|
+
*/
|
|
82
|
+
export let use_serialize: boolean;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Default data to set files to if any cannot be loaded
|
|
86
|
+
*/
|
|
87
|
+
export let default_data: LuaMap<string, unknown>;
|
|
88
|
+
|
|
89
|
+
export function set_appname(name: string): void;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* XOR the input against a key, cycling the key as needed. Defaults to obfuscation_key.
|
|
93
|
+
*/
|
|
94
|
+
export function obfuscate(input: string, key?: string): string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The save path a file resolves to, or nil when no file was given
|
|
98
|
+
*/
|
|
99
|
+
export function get_file_path(file: string): string | undefined;
|
|
100
|
+
|
|
101
|
+
export function load(file: string): boolean | undefined;
|
|
102
|
+
|
|
103
|
+
export function get(file: string, key: string): unknown;
|
|
104
|
+
|
|
105
|
+
export function set(file: string, key: string, value: any): boolean | undefined;
|
|
106
|
+
|
|
107
|
+
export function save(file: string, force?: boolean): boolean | undefined;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* You can save all files at once. By default, it will only actually save files with changes, but you can force saving all files by setting the force flag to true.
|
|
111
|
+
* @param force false only saves changed files and true saves all files
|
|
112
|
+
*/
|
|
113
|
+
export function save_all(force?: boolean): void;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Whether a key is set on a loaded file. Returns nil when the file is loaded but the key is absent.
|
|
117
|
+
*/
|
|
118
|
+
export function key_exists(file: string, key: string): boolean | undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Alias of key_exists
|
|
122
|
+
*/
|
|
123
|
+
export function isset(file: string, key: string): boolean | undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Reset a file to its default_data entry, or to empty when it has none
|
|
127
|
+
*/
|
|
128
|
+
export function reset_to_default(file: string): boolean | undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Whether a file is currently in the loaded list
|
|
132
|
+
*/
|
|
133
|
+
export function is_loaded(file: string): boolean;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* In your update, if you want autosave to be enabled, you will need to include
|
|
137
|
+
*/
|
|
138
|
+
export function update(dt: number): void;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Save all loaded files; call from your script's final
|
|
142
|
+
*/
|
|
143
|
+
export function final(): void;
|
|
144
|
+
}
|
|
@@ -6,6 +6,31 @@
|
|
|
6
6
|
* @noResolution
|
|
7
7
|
*/
|
|
8
8
|
declare module "dicebag.dicebag" {
|
|
9
|
+
/**
|
|
10
|
+
* Every marble bag `bag_create` has made, keyed by its identifier. `bag_draw` reads
|
|
11
|
+
* and decrements the counts here; `bag_reset` restores them from the `full_*` pair.
|
|
12
|
+
*/
|
|
13
|
+
export const bags: LuaMap<
|
|
14
|
+
string | number | Hash,
|
|
15
|
+
{
|
|
16
|
+
success: number;
|
|
17
|
+
fail: number;
|
|
18
|
+
full_success: number;
|
|
19
|
+
full_fail: number;
|
|
20
|
+
reset_on_success: boolean;
|
|
21
|
+
}
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Every rollable table `table_create` has made, keyed by its identifier. `active` is
|
|
26
|
+
* what `table_roll` draws from and removes as it goes; `original` is the untouched
|
|
27
|
+
* copy `table_reset` restores from.
|
|
28
|
+
*/
|
|
29
|
+
export const tables: LuaMap<
|
|
30
|
+
string | number | Hash,
|
|
31
|
+
{ active: Array<[number, any, boolean?]>; original: Array<[number, any, boolean?]> }
|
|
32
|
+
>;
|
|
33
|
+
|
|
9
34
|
/**
|
|
10
35
|
* Sets up the randomseed and clears the first number of random rolls.
|
|
11
36
|
* @param seed optional seed, if not specified a seed will be generated using socket.gettime().
|