@defold-typescript/library-types 0.22.0 → 0.23.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/{bridge.bridge.json → bridge.json} +749 -844
- package/api-doc/decore.json +22 -22
- package/api-doc/druid.json +195 -1790
- package/api-doc/event.json +1074 -0
- package/api-doc/immutable.json +65 -0
- package/api-doc/lang.json +528 -0
- package/api-doc/{event.event.json → log.json} +96 -101
- package/api-doc/narrator.json +647 -0
- package/api-doc/proto.json +995 -0
- package/api-doc/saver.saver.json +713 -263
- package/api-doc/saver.storage.json +282 -52
- package/api-doc/squid.json +846 -0
- package/api-doc/tweener.json +277 -0
- package/generated/bridge.d.ts +468 -0
- package/generated/decore.d.ts +36 -36
- package/generated/druid.d.ts +137 -443
- package/generated/event.d.ts +318 -0
- package/generated/immutable.d.ts +13 -0
- package/generated/lang.d.ts +101 -0
- package/generated/log.d.ts +36 -0
- package/generated/narrator.d.ts +121 -0
- package/generated/proto.d.ts +146 -0
- package/generated/saver.saver.d.ts +287 -42
- package/generated/saver.storage.d.ts +77 -14
- package/generated/squid.d.ts +127 -0
- package/generated/tweener.d.ts +42 -0
- package/library-classification.json +0 -71
- package/library-targets.json +0 -66
- package/luals-targets.json +114 -0
- package/package.json +4 -33
- package/script-api-targets.json +15 -0
- package/scripts/__snapshots__/parse-luals.test.ts.snap +340 -75
- package/scripts/apply-luals-overrides.ts +63 -0
- package/scripts/emit-library-dts.ts +84 -3
- package/scripts/lower-api-doc.ts +48 -16
- package/scripts/luals-fidelity.ts +7 -0
- package/scripts/map-luals-types.ts +34 -1
- package/scripts/parse-luals.ts +423 -18
- package/scripts/sync-luals-types.ts +15 -1
- package/scripts/sync-script-api-types.ts +368 -0
- 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/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/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
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a definition stub with incomplete or untested signatures.
|
|
3
|
-
* Contributions to improve the accuracy of these types are welcome.
|
|
4
|
-
* @see {@link https://github.com/astrochili/narrator|Github Source}
|
|
5
|
-
* @noResolution
|
|
6
|
-
*/
|
|
7
|
-
declare module 'narrator.narrator' {
|
|
8
|
-
type Paragraph = {
|
|
9
|
-
text: string;
|
|
10
|
-
tags?: string[];
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type Choice = {
|
|
14
|
-
text: string;
|
|
15
|
-
tags?: string[];
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
type Book = {};
|
|
19
|
-
|
|
20
|
-
type SaveState = {};
|
|
21
|
-
|
|
22
|
-
class Story {
|
|
23
|
-
begin(): void;
|
|
24
|
-
can_continue(): boolean;
|
|
25
|
-
continue(steps?: number): Paragraph[] | Paragraph;
|
|
26
|
-
can_choose(): boolean;
|
|
27
|
-
get_choices(): Choice[];
|
|
28
|
-
choose(index: number): void;
|
|
29
|
-
jump_to(path: string): void;
|
|
30
|
-
get_visits(path: string): number;
|
|
31
|
-
get_tags(path: string): string[];
|
|
32
|
-
save_state(): SaveState;
|
|
33
|
-
load_state(state: SaveState): void;
|
|
34
|
-
observe(
|
|
35
|
-
variable: string,
|
|
36
|
-
observer: (this: void, value: unknown) => void,
|
|
37
|
-
): void;
|
|
38
|
-
bind(
|
|
39
|
-
func_name: string,
|
|
40
|
-
handler: (this: void, ...args: any[]) => unknown,
|
|
41
|
-
): void;
|
|
42
|
-
global_tags: string[];
|
|
43
|
-
constants: Readonly<{ [key: string]: unknown }>;
|
|
44
|
-
variables: { [key: string]: unknown };
|
|
45
|
-
migrate: (
|
|
46
|
-
this: void,
|
|
47
|
-
state: SaveState,
|
|
48
|
-
old_version: number,
|
|
49
|
-
new_version: number,
|
|
50
|
-
) => SaveState;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function parse_file(
|
|
54
|
-
this: void,
|
|
55
|
-
path: string,
|
|
56
|
-
params?: { save?: boolean },
|
|
57
|
-
): Book;
|
|
58
|
-
|
|
59
|
-
export function parse_content(
|
|
60
|
-
this: void,
|
|
61
|
-
content: string,
|
|
62
|
-
inclusions?: string[],
|
|
63
|
-
): Book;
|
|
64
|
-
|
|
65
|
-
export function init_story(this: void, book: Book): Story;
|
|
66
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/** @noSelfInFile **/
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @see {@link https://github.com/Insality/defold-proto|Github Source}
|
|
7
|
-
* @see {@link https://github.com/Insality/defold-proto/blob/main/API_REFERENCE.md|API Reference}
|
|
8
|
-
* @example `import * as proto from 'proto.proto'`
|
|
9
|
-
* @noResolution
|
|
10
|
-
*/
|
|
11
|
-
declare module 'proto.proto' {
|
|
12
|
-
interface LoggerInstance {
|
|
13
|
-
trace(this: any, message: string, data?: {}): void;
|
|
14
|
-
debug(this: any, message: string, data?: {}): void;
|
|
15
|
-
info(this: any, message: string, data?: {}): void;
|
|
16
|
-
warn(this: any, message: string, data?: {}): void;
|
|
17
|
-
error(this: any, message: string, data?: {}): void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function init(configOrPath: string | { [key: string]: string }): void;
|
|
21
|
-
export function get(protoType: string): { [key: string]: unknown };
|
|
22
|
-
export function encode(
|
|
23
|
-
protoType: string,
|
|
24
|
-
data: { [key: string]: any },
|
|
25
|
-
): string;
|
|
26
|
-
export function decode(
|
|
27
|
-
protoType: string,
|
|
28
|
-
data?: string,
|
|
29
|
-
): { [key: string]: unknown };
|
|
30
|
-
export function verify(
|
|
31
|
-
protoType: string,
|
|
32
|
-
data: { [key: string]: any },
|
|
33
|
-
): { [key: string]: unknown };
|
|
34
|
-
export function set_logger(logger_instance: LoggerInstance): void;
|
|
35
|
-
export function set_logger(remove_logger_instance: undefined): void;
|
|
36
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/** @noSelfInFile **/
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Squid is a standalone injectable system for saveable logging of user logs, errors and crashes for Defold.
|
|
5
|
-
* @see {@link https://github.com/paweljarosz/squid|Github Source}
|
|
6
|
-
* @example `import * as squid from 'squid.squid'`
|
|
7
|
-
* @noResolution
|
|
8
|
-
*/
|
|
9
|
-
declare module 'squid.squid' {
|
|
10
|
-
type SquidConfig = {
|
|
11
|
-
app_catalog: string;
|
|
12
|
-
log_file_name: string;
|
|
13
|
-
log_file_extension: string;
|
|
14
|
-
is_enabled: boolean;
|
|
15
|
-
is_enabled_in_release: boolean;
|
|
16
|
-
is_printing: boolean;
|
|
17
|
-
is_saving: boolean;
|
|
18
|
-
is_adding_timestamp: boolean;
|
|
19
|
-
is_using_allowlist: boolean;
|
|
20
|
-
days_to_delete_logs: number;
|
|
21
|
-
min_log_level: number;
|
|
22
|
-
unsaved_logs_buffer: number;
|
|
23
|
-
max_data_length: number;
|
|
24
|
-
max_data_depth: number;
|
|
25
|
-
is_printing_crashes: boolean;
|
|
26
|
-
is_saving_crashes: boolean;
|
|
27
|
-
crash_file_name: string;
|
|
28
|
-
crash_file_extension: string;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
interface SquidShared {
|
|
32
|
-
ALLOWLIST: { [key: string]: boolean };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** @noSelf **/
|
|
36
|
-
interface CoreModule extends SquidShared {
|
|
37
|
-
TRACE: number;
|
|
38
|
-
DEBUG: number;
|
|
39
|
-
INFO: number;
|
|
40
|
-
WARN: number;
|
|
41
|
-
ERROR: number;
|
|
42
|
-
/** Create a new instance of the Squid logger */
|
|
43
|
-
['new'](tag?: string, is_allowed?: boolean): SquidInstance;
|
|
44
|
-
|
|
45
|
-
/** Get Squid configuration */
|
|
46
|
-
get_config(): SquidConfig;
|
|
47
|
-
/** Set and use user configuration */
|
|
48
|
-
set_config(config: SquidConfig): void;
|
|
49
|
-
|
|
50
|
-
/** Initialize Squid for error and crash handling and logging */
|
|
51
|
-
init(): void;
|
|
52
|
-
|
|
53
|
-
/** Set if logs should be saved to file */
|
|
54
|
-
set_allowed(tag: string, enabled: boolean): void;
|
|
55
|
-
|
|
56
|
-
trace(message: string, data?: AnyNotNil, tag?: string): void;
|
|
57
|
-
debug(message: string, data?: AnyNotNil, tag?: string): void;
|
|
58
|
-
info(message: string, data?: AnyNotNil, tag?: string): void;
|
|
59
|
-
warn(message: string, data?: AnyNotNil, tag?: string): void;
|
|
60
|
-
error(message: string, data?: AnyNotNil, tag?: string): void;
|
|
61
|
-
|
|
62
|
-
/** Log message with provided level, message, data and tag */
|
|
63
|
-
log(message: string, level: number, data?: AnyNotNil, tag?: string): void;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Explicitly save buffer of unsaved logs to file
|
|
67
|
-
* @returns true if saved logs successfully, false otherwise
|
|
68
|
-
*/
|
|
69
|
-
save_logs(): boolean;
|
|
70
|
-
|
|
71
|
-
/** Finalize Squid logging - check for crashes and saved all unsaved buffered logs */
|
|
72
|
-
final(): void;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface SquidInstance extends SquidShared {
|
|
76
|
-
tag: string;
|
|
77
|
-
|
|
78
|
-
/** Initialize Squid for error and crash handling and logging */
|
|
79
|
-
init(): void;
|
|
80
|
-
|
|
81
|
-
/** Set if logs should be saved to file */
|
|
82
|
-
set_allowed(tag: string, enabled: boolean): void;
|
|
83
|
-
|
|
84
|
-
trace(message: string, data?: AnyNotNil, tag?: string): void;
|
|
85
|
-
debug(message: string, data?: AnyNotNil, tag?: string): void;
|
|
86
|
-
info(message: string, data?: AnyNotNil, tag?: string): void;
|
|
87
|
-
warn(message: string, data?: AnyNotNil, tag?: string): void;
|
|
88
|
-
error(message: string, data?: AnyNotNil, tag?: string): void;
|
|
89
|
-
|
|
90
|
-
/** Log message with provided level, message, data and tag */
|
|
91
|
-
log(message: string, level: number, data?: AnyNotNil, tag?: string): void;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Explicitly save buffer of unsaved logs to file
|
|
95
|
-
* @returns true if saved logs successfully, false otherwise
|
|
96
|
-
*/
|
|
97
|
-
save_logs(): boolean;
|
|
98
|
-
|
|
99
|
-
/** Finalize Squid logging - check for crashes and saved all unsaved buffered logs */
|
|
100
|
-
final(): void;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
type Squid = Readonly<CoreModule>;
|
|
104
|
-
const exportThis: Squid;
|
|
105
|
-
export = exportThis;
|
|
106
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/** @noSelfInFile */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Timer Based Defold Tween Library
|
|
5
|
-
* @see {@link https://github.com/Insality/defold-tweener|Github Source}
|
|
6
|
-
* @noResolution
|
|
7
|
-
*/
|
|
8
|
-
declare module 'tweener.tweener' {
|
|
9
|
-
type TweenFunc = Readonly<{ __brand: 'tweener' }> & number;
|
|
10
|
-
type AnyTweenFunc =
|
|
11
|
-
| TweenFunc
|
|
12
|
-
| typeof go.EASING_INBACK
|
|
13
|
-
| typeof go.EASING_INBOUNCE
|
|
14
|
-
| typeof go.EASING_INCIRC
|
|
15
|
-
| typeof go.EASING_INCUBIC
|
|
16
|
-
| typeof go.EASING_INELASTIC
|
|
17
|
-
| typeof go.EASING_INEXPO
|
|
18
|
-
| typeof go.EASING_INOUTBACK
|
|
19
|
-
| typeof go.EASING_INOUTBOUNCE
|
|
20
|
-
| typeof go.EASING_INOUTCIRC
|
|
21
|
-
| typeof go.EASING_INOUTCUBIC
|
|
22
|
-
| typeof go.EASING_INOUTELASTIC
|
|
23
|
-
| typeof go.EASING_INOUTEXPO
|
|
24
|
-
| typeof go.EASING_INOUTQUAD
|
|
25
|
-
| typeof go.EASING_INOUTQUART
|
|
26
|
-
| typeof go.EASING_INOUTQUINT
|
|
27
|
-
| typeof go.EASING_INOUTSINE
|
|
28
|
-
| typeof go.EASING_INQUAD
|
|
29
|
-
| typeof go.EASING_INQUART
|
|
30
|
-
| typeof go.EASING_INQUINT
|
|
31
|
-
| typeof go.EASING_INSINE
|
|
32
|
-
| typeof go.EASING_LINEAR
|
|
33
|
-
| typeof go.EASING_OUTBACK
|
|
34
|
-
| typeof go.EASING_OUTBOUNCE
|
|
35
|
-
| typeof go.EASING_OUTCIRC
|
|
36
|
-
| typeof go.EASING_OUTCUBIC
|
|
37
|
-
| typeof go.EASING_OUTELASTIC
|
|
38
|
-
| typeof go.EASING_OUTEXPO
|
|
39
|
-
| typeof go.EASING_OUTINBACK
|
|
40
|
-
| typeof go.EASING_OUTINBOUNCE
|
|
41
|
-
| typeof go.EASING_OUTINCIRC
|
|
42
|
-
| typeof go.EASING_OUTINCUBIC
|
|
43
|
-
| typeof go.EASING_OUTINELASTIC
|
|
44
|
-
| typeof go.EASING_OUTINEXPO
|
|
45
|
-
| typeof go.EASING_OUTINQUAD
|
|
46
|
-
| typeof go.EASING_OUTINQUART
|
|
47
|
-
| typeof go.EASING_OUTINQUINT
|
|
48
|
-
| typeof go.EASING_OUTINSINE
|
|
49
|
-
| typeof go.EASING_OUTQUAD
|
|
50
|
-
| typeof go.EASING_OUTQUART
|
|
51
|
-
| typeof go.EASING_OUTQUINT
|
|
52
|
-
| typeof go.EASING_OUTSINE
|
|
53
|
-
| typeof gui.EASING_INBACK
|
|
54
|
-
| typeof gui.EASING_INBOUNCE
|
|
55
|
-
| typeof gui.EASING_INCIRC
|
|
56
|
-
| typeof gui.EASING_INCUBIC
|
|
57
|
-
| typeof gui.EASING_INELASTIC
|
|
58
|
-
| typeof gui.EASING_INEXPO
|
|
59
|
-
| typeof gui.EASING_INOUTBACK
|
|
60
|
-
| typeof gui.EASING_INOUTBOUNCE
|
|
61
|
-
| typeof gui.EASING_INOUTCIRC
|
|
62
|
-
| typeof gui.EASING_INOUTCUBIC
|
|
63
|
-
| typeof gui.EASING_INOUTELASTIC
|
|
64
|
-
| typeof gui.EASING_INOUTEXPO
|
|
65
|
-
| typeof gui.EASING_INOUTQUAD
|
|
66
|
-
| typeof gui.EASING_INOUTQUART
|
|
67
|
-
| typeof gui.EASING_INOUTQUINT
|
|
68
|
-
| typeof gui.EASING_INOUTSINE
|
|
69
|
-
| typeof gui.EASING_INQUAD
|
|
70
|
-
| typeof gui.EASING_INQUART
|
|
71
|
-
| typeof gui.EASING_INQUINT
|
|
72
|
-
| typeof gui.EASING_INSINE
|
|
73
|
-
| typeof gui.EASING_LINEAR
|
|
74
|
-
| typeof gui.EASING_OUTBACK
|
|
75
|
-
| typeof gui.EASING_OUTBOUNCE
|
|
76
|
-
| typeof gui.EASING_OUTCIRC
|
|
77
|
-
| typeof gui.EASING_OUTCUBIC
|
|
78
|
-
| typeof gui.EASING_OUTELASTIC
|
|
79
|
-
| typeof gui.EASING_OUTEXPO
|
|
80
|
-
| typeof gui.EASING_OUTINBACK
|
|
81
|
-
| typeof gui.EASING_OUTINBOUNCE
|
|
82
|
-
| typeof gui.EASING_OUTINCIRC
|
|
83
|
-
| typeof gui.EASING_OUTINCUBIC
|
|
84
|
-
| typeof gui.EASING_OUTINELASTIC
|
|
85
|
-
| typeof gui.EASING_OUTINEXPO
|
|
86
|
-
| typeof gui.EASING_OUTINQUAD
|
|
87
|
-
| typeof gui.EASING_OUTINQUART
|
|
88
|
-
| typeof gui.EASING_OUTINQUINT
|
|
89
|
-
| typeof gui.EASING_OUTINSINE
|
|
90
|
-
| typeof gui.EASING_OUTQUAD
|
|
91
|
-
| typeof gui.EASING_OUTQUART
|
|
92
|
-
| typeof gui.EASING_OUTQUINT
|
|
93
|
-
| typeof gui.EASING_OUTSINE;
|
|
94
|
-
export const insine: TweenFunc;
|
|
95
|
-
export const inquad: TweenFunc;
|
|
96
|
-
export const incubic: TweenFunc;
|
|
97
|
-
export const incirc: TweenFunc;
|
|
98
|
-
export const inquart: TweenFunc;
|
|
99
|
-
export const inquint: TweenFunc;
|
|
100
|
-
export const inexpo: TweenFunc;
|
|
101
|
-
export const inback: TweenFunc;
|
|
102
|
-
export const inelastic: TweenFunc;
|
|
103
|
-
export const inbounce: TweenFunc;
|
|
104
|
-
export const outsine: TweenFunc;
|
|
105
|
-
export const outquad: TweenFunc;
|
|
106
|
-
export const outcubic: TweenFunc;
|
|
107
|
-
export const outcirc: TweenFunc;
|
|
108
|
-
export const outquart: TweenFunc;
|
|
109
|
-
export const outquint: TweenFunc;
|
|
110
|
-
export const outexpo: TweenFunc;
|
|
111
|
-
export const outback: TweenFunc;
|
|
112
|
-
export const outelastic: TweenFunc;
|
|
113
|
-
export const outbounce: TweenFunc;
|
|
114
|
-
export const inoutsine: TweenFunc;
|
|
115
|
-
export const inoutquad: TweenFunc;
|
|
116
|
-
export const inoutcubic: TweenFunc;
|
|
117
|
-
export const inoutcirc: TweenFunc;
|
|
118
|
-
export const inoutquart: TweenFunc;
|
|
119
|
-
export const inoutquint: TweenFunc;
|
|
120
|
-
export const inoutexpo: TweenFunc;
|
|
121
|
-
export const inoutback: TweenFunc;
|
|
122
|
-
export const inoutelastic: TweenFunc;
|
|
123
|
-
export const inoutbounce: TweenFunc;
|
|
124
|
-
export const outinsine: TweenFunc;
|
|
125
|
-
export const outinquad: TweenFunc;
|
|
126
|
-
export const outincubic: TweenFunc;
|
|
127
|
-
export const outincirc: TweenFunc;
|
|
128
|
-
export const outinquart: TweenFunc;
|
|
129
|
-
export const outinquint: TweenFunc;
|
|
130
|
-
export const outinexpo: TweenFunc;
|
|
131
|
-
export const outinback: TweenFunc;
|
|
132
|
-
export const outinelastic: TweenFunc;
|
|
133
|
-
export const outinbounce: TweenFunc;
|
|
134
|
-
|
|
135
|
-
export function tween(
|
|
136
|
-
tween_function: AnyTweenFunc,
|
|
137
|
-
from: number,
|
|
138
|
-
to: number,
|
|
139
|
-
time: number,
|
|
140
|
-
callback: (value: number, is_final_call: boolean) => void,
|
|
141
|
-
dt?: number,
|
|
142
|
-
): Hash;
|
|
143
|
-
|
|
144
|
-
export function ease(
|
|
145
|
-
tween_function: AnyTweenFunc,
|
|
146
|
-
from: number,
|
|
147
|
-
to: number,
|
|
148
|
-
time: number,
|
|
149
|
-
time_elapsed: number,
|
|
150
|
-
): number;
|
|
151
|
-
}
|