Skip to content

Commit c38f769

Browse files
[titanium] ran dprint fmt
1 parent 77fd45a commit c38f769

4 files changed

Lines changed: 61871 additions & 62381 deletions

File tree

types/titanium/console.d.ts

Lines changed: 105 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -3,111 +3,111 @@
33
* and modified for Titanium
44
*/
55

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+
}
87110
}
88111

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;
113113
}

types/titanium/globals.d.ts

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -106,64 +106,64 @@ declare function setTimeout(func: (...args: any[]) => void, delay?: number): num
106106
// String constructor augmentation ---------------------------------------------
107107

108108
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;
155155
}
156156

157157
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+
}
169169
}

0 commit comments

Comments
 (0)