@types/titanium 12.0.0 → 12.0.1

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.
titanium/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Titanium (https://github.com/appceler
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/titanium.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sat, 18 Mar 2023 09:32:31 GMT
11
+ * Last updated: Sat, 26 Aug 2023 17:03:03 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `DIST_ADHOC`, `DIST_STORE`, `ENV_DEV`, `ENV_DEVELOPMENT`, `ENV_PROD`, `ENV_PRODUCTION`, `ENV_TEST`, `L`, `OS_ANDROID`, `OS_IOS`, `Titanium`, `alert`, `clearInterval`, `clearTimeout`, `console`, `decodeURIComponent`, `encodeURIComponent`, `global`, `require`, `setInterval`, `setTimeout`
14
14
 
titanium/console.d.ts CHANGED
@@ -3,111 +3,111 @@
3
3
  * and modified for Titanium
4
4
  */
5
5
 
6
- declare module "console" {
7
- global {
8
- // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
9
- /**
10
- * Console logging facilities.
11
- */
12
- interface Console {
13
- /**
14
- * A simple assertion test that verifies whether value is truthy. If it is not, Assertion failed is logged. If provided, the error message is formatted using `util.format()` by passing along all message arguments. The output is used as the error message.
15
- */
16
- assert(value?: any, ...message: any[]): void;
17
-
18
- /**
19
- * Maintains an internal counter specific to `label` and outputs to stdout the number of times `console.count()` has been called with the given `label`.
20
- */
21
- count(label?: string): void;
22
-
23
- /**
24
- * Resets the internal counter specific to `label`.
25
- */
26
- countReset(label?: string): void;
27
-
28
- /**
29
- * Log a message at the `debug` level.
30
- */
31
- debug(...message: any[]): void;
32
-
33
- /**
34
- * Log a message at the `error` level.
35
- */
36
- error(...message: any[]): void;
37
-
38
- /**
39
- * Increases indentation of subsequent lines by spaces for `groupIndentation` length.
40
- */
41
- group(...label: any[]): void;
42
-
43
- /**
44
- * Alias for `group()`
45
- */
46
- groupCollapsed(...label: any[]): void;
47
-
48
- /**
49
- * Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
50
- */
51
- groupEnd(): void;
52
-
53
- /**
54
- * Log a message at the `info` level.
55
- */
56
- info(...message: any[]): void;
57
-
58
- /**
59
- * Log a message at the `info` level.
60
- */
61
- log(...message: any[]): void;
62
-
63
- /**
64
- * Start a timer to track duration of an operation.
65
- */
66
- time(label?: string): void;
67
-
68
- /**
69
- * Stop a timer that was previously started.
70
- */
71
- timeEnd(label?: string): void;
72
-
73
- /**
74
- * Log duration taken so far for an operation.
75
- */
76
- timeLog(label?: string, ...data: any[]): void;
77
-
78
- /**
79
- * Log a message at the `trace` level.
80
- */
81
- trace(...message: any[]): void;
82
-
83
- /**
84
- * Log a message at the `warn` level.
85
- */
86
- warn(...message: any[]): void;
6
+ declare module 'console' {
7
+ global {
8
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
9
+ /**
10
+ * Console logging facilities.
11
+ */
12
+ interface Console {
13
+ /**
14
+ * A simple assertion test that verifies whether value is truthy. If it is not, Assertion failed is logged. If provided, the error message is formatted using `util.format()` by passing along all message arguments. The output is used as the error message.
15
+ */
16
+ assert(value?: any, ...message: any[]): void;
17
+
18
+ /**
19
+ * Maintains an internal counter specific to `label` and outputs to stdout the number of times `console.count()` has been called with the given `label`.
20
+ */
21
+ count(label?: string): void;
22
+
23
+ /**
24
+ * Resets the internal counter specific to `label`.
25
+ */
26
+ countReset(label?: string): void;
27
+
28
+ /**
29
+ * Log a message at the `debug` level.
30
+ */
31
+ debug(...message: any[]): void;
32
+
33
+ /**
34
+ * Log a message at the `error` level.
35
+ */
36
+ error(...message: any[]): void;
37
+
38
+ /**
39
+ * Increases indentation of subsequent lines by spaces for `groupIndentation` length.
40
+ */
41
+ group(...label: any[]): void;
42
+
43
+ /**
44
+ * Alias for `group()`
45
+ */
46
+ groupCollapsed(...label: any[]): void;
47
+
48
+ /**
49
+ * Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
50
+ */
51
+ groupEnd(): void;
52
+
53
+ /**
54
+ * Log a message at the `info` level.
55
+ */
56
+ info(...message: any[]): void;
57
+
58
+ /**
59
+ * Log a message at the `info` level.
60
+ */
61
+ log(...message: any[]): void;
62
+
63
+ /**
64
+ * Start a timer to track duration of an operation.
65
+ */
66
+ time(label?: string): void;
67
+
68
+ /**
69
+ * Stop a timer that was previously started.
70
+ */
71
+ timeEnd(label?: string): void;
72
+
73
+ /**
74
+ * Log duration taken so far for an operation.
75
+ */
76
+ timeLog(label?: string, ...data: any[]): void;
77
+
78
+ /**
79
+ * Log a message at the `trace` level.
80
+ */
81
+ trace(...message: any[]): void;
82
+
83
+ /**
84
+ * Log a message at the `warn` level.
85
+ */
86
+ warn(...message: any[]): void;
87
+ }
88
+
89
+ var console: Console;
90
+
91
+ namespace Titanium {
92
+ interface ConsoleConstructorOptions {
93
+ stdout: object;
94
+ stderr?: object | undefined;
95
+ ignoreErrors?: boolean | undefined;
96
+ colorMode?: boolean | 'auto' | undefined;
97
+ inspectOptions?: object | undefined;
98
+ }
99
+
100
+ interface ConsoleConstructor {
101
+ prototype: Console;
102
+ new(stdout: object, stderr?: object, ignoreErrors?: boolean): Console;
103
+ new(options: ConsoleConstructorOptions): Console;
104
+ }
105
+
106
+ interface Global {
107
+ console: typeof console;
108
+ }
109
+ }
87
110
  }
88
111
 
89
- var console: Console;
90
-
91
- namespace Titanium {
92
- interface ConsoleConstructorOptions {
93
- stdout: object;
94
- stderr?: object | undefined;
95
- ignoreErrors?: boolean | undefined;
96
- colorMode?: boolean | 'auto' | undefined;
97
- inspectOptions?: object | undefined;
98
- }
99
-
100
- interface ConsoleConstructor {
101
- prototype: Console;
102
- new(stdout: object, stderr?: object, ignoreErrors?: boolean): Console;
103
- new(options: ConsoleConstructorOptions): Console;
104
- }
105
-
106
- interface Global {
107
- console: typeof console;
108
- }
109
- }
110
- }
111
-
112
- export = console;
112
+ export = console;
113
113
  }
titanium/globals.d.ts CHANGED
@@ -106,64 +106,64 @@ declare function setTimeout(func: (...args: any[]) => void, delay?: number): num
106
106
  // String constructor augmentation ---------------------------------------------
107
107
 
108
108
  interface StringConstructor {
109
- /**
110
- * Formats a string using `printf`-style substitution.
111
- *
112
- * @param formatString An IEEE `printf`-style string, containing zero or more conversion specifications.
113
- * @param value Values to substitute into the `formatString`.
114
- */
115
- format(formatString: string, ...value: Array<string | number>): string;
116
-
117
- /**
118
- * Formats a number into the currency format, including currency symbol, of the locale
119
- * configured for the system.
120
- *
121
- * @param value Currency value,
122
- */
123
- formatCurrency(value: number): string;
124
-
125
- /**
126
- * Formats a date into the date format of the locale configured for the system.
127
- *
128
- * @param date Date to format.
129
- * @param format Date format to use. One of 'short', 'medium', 'long' or 'full'. Defaults to 'short'.
130
- */
131
- formatDate(date: Date, format?: string): string;
132
-
133
- /**
134
- * Formats a number into the decimal format, including decimal symbol, of the locale
135
- * configured for the system.
136
- *
137
- * @param value Value to format.
138
- * @param pattern Format pattern.
139
- */
140
- formatDecimal(value: number, pattern: string): string;
141
- /**
142
- * @param value Value to format.
143
- * @param locale Locale string. For example, `en-US` for US English.
144
- * @param pattern Format pattern.
145
- */
146
- formatDecimal(value: number, locale: string, pattern: string): string;
147
-
148
- /**
149
- * Formats a date into the time format of the locale configured for the system.
150
- *
151
- * @param date Date to format.
152
- * @param format Date format to use. One of 'short', 'medium', or 'long' (iOS only). Defaults to 'short'.
153
- */
154
- formatTime(date: Date, format?: string): string;
109
+ /**
110
+ * Formats a string using `printf`-style substitution.
111
+ *
112
+ * @param formatString An IEEE `printf`-style string, containing zero or more conversion specifications.
113
+ * @param value Values to substitute into the `formatString`.
114
+ */
115
+ format(formatString: string, ...value: Array<string | number>): string;
116
+
117
+ /**
118
+ * Formats a number into the currency format, including currency symbol, of the locale
119
+ * configured for the system.
120
+ *
121
+ * @param value Currency value,
122
+ */
123
+ formatCurrency(value: number): string;
124
+
125
+ /**
126
+ * Formats a date into the date format of the locale configured for the system.
127
+ *
128
+ * @param date Date to format.
129
+ * @param format Date format to use. One of 'short', 'medium', 'long' or 'full'. Defaults to 'short'.
130
+ */
131
+ formatDate(date: Date, format?: string): string;
132
+
133
+ /**
134
+ * Formats a number into the decimal format, including decimal symbol, of the locale
135
+ * configured for the system.
136
+ *
137
+ * @param value Value to format.
138
+ * @param pattern Format pattern.
139
+ */
140
+ formatDecimal(value: number, pattern: string): string;
141
+ /**
142
+ * @param value Value to format.
143
+ * @param locale Locale string. For example, `en-US` for US English.
144
+ * @param pattern Format pattern.
145
+ */
146
+ formatDecimal(value: number, locale: string, pattern: string): string;
147
+
148
+ /**
149
+ * Formats a date into the time format of the locale configured for the system.
150
+ *
151
+ * @param date Date to format.
152
+ * @param format Date format to use. One of 'short', 'medium', or 'long' (iOS only). Defaults to 'short'.
153
+ */
154
+ formatTime(date: Date, format?: string): string;
155
155
  }
156
156
 
157
157
  declare namespace Titanium {
158
- interface Global {
159
- L(key: string, hint?: string): string;
160
- alert(message: string): void;
161
- clearInterval(timerId?: number): void;
162
- clearTimeout(timerId?: number): void;
163
- decodeURIComponent(encodedURI: string): string;
164
- encodeURIComponent(string: string): string;
165
- require(moduleId: string): any;
166
- setInterval(func: (...args: any[]) => void, delay?: number): number;
167
- setTimeout(func: (...args: any[]) => void, delay?: number): number;
168
- }
158
+ interface Global {
159
+ L(key: string, hint?: string): string;
160
+ alert(message: string): void;
161
+ clearInterval(timerId?: number): void;
162
+ clearTimeout(timerId?: number): void;
163
+ decodeURIComponent(encodedURI: string): string;
164
+ encodeURIComponent(string: string): string;
165
+ require(moduleId: string): any;
166
+ setInterval(func: (...args: any[]) => void, delay?: number): number;
167
+ setTimeout(func: (...args: any[]) => void, delay?: number): number;
168
+ }
169
169
  }