1
1
import { IOptions } from "../declarations" ;
2
2
import { IJsonFileSettingsService } from "./definitions/json-file-settings-service" ;
3
3
import {
4
- IGoogleAnalyticsData ,
5
4
IEventActionData ,
5
+ IGoogleAnalyticsData ,
6
6
} from "./definitions/google-analytics" ;
7
+ import * as child_process from "child_process" ;
7
8
9
+ // tslint:disable-next-line:interface-name
8
10
interface Object {
9
11
[ key : string ] : any ;
10
12
}
@@ -14,6 +16,7 @@ interface IStringDictionary extends IDictionary<string> {}
14
16
/**
15
17
* Describes iTunes Connect application types
16
18
*/
19
+ // tslint:disable-next-line:interface-name
17
20
interface IiTunesConnectApplicationType {
18
21
/**
19
22
* Applications developed for iOS
@@ -40,6 +43,7 @@ declare const enum GoogleAnalyticsDataType {
40
43
/**
41
44
* Descibes iTunes Connect applications
42
45
*/
46
+ // tslint:disable-next-line:interface-name
43
47
interface IiTunesConnectApplication {
44
48
/**
45
49
* Unique Apple ID for each application. Automatically generated and assigned by Apple.
@@ -68,7 +72,7 @@ interface IiTunesConnectApplication {
68
72
sku : string ;
69
73
/**
70
74
* Application's type
71
- * @type {IItunesConnectApplicationTypes }
75
+ * @type {string }
72
76
*/
73
77
type : string ;
74
78
/**
@@ -128,7 +132,7 @@ interface IContentDeliveryBody {
128
132
result : {
129
133
/**
130
134
* A list of the user's applications.
131
- * @type {IItunesConnectApplication [] }
135
+ * @type {IiTunesConnectApplication [] }
132
136
*/
133
137
Applications : IiTunesConnectApplication [ ] ;
134
138
/**
@@ -365,23 +369,23 @@ interface IFileSystem {
365
369
/**
366
370
* Reads the entire contents of a file.
367
371
* @param {string } filename Path to the file that has to be read.
368
- * @param {string } @optional options Options used for reading the file - encoding and flags.
372
+ * @param {string } options Options used for reading the file - encoding and flags.
369
373
* @returns {string|Buffer } Content of the file as buffer. In case encoding is specified, the content is returned as string.
370
374
*/
371
375
readFile ( filename : string , options ?: IReadFileOptions ) : string | Buffer ;
372
376
373
377
/**
374
378
* Reads the entire contents of a file and returns the result as string.
375
379
* @param {string } filename Path to the file that has to be read.
376
- * @param {string } @optional options Options used for reading the file - encoding and flags. If options are not passed, utf8 is used.
380
+ * @param {IReadFileOptions | string } encoding Options used for reading the file - encoding and flags. If options are not passed, utf8 is used.
377
381
* @returns {string } Content of the file as string.
378
382
*/
379
383
readText ( filename : string , encoding ?: IReadFileOptions | string ) : string ;
380
384
381
385
/**
382
386
* Reads the entire content of a file and parses it to JSON object.
383
387
* @param {string } filename Path to the file that has to be read.
384
- * @param {string } @optional encoding File encoding, defaults to utf8.
388
+ * @param {string } encoding File encoding, defaults to utf8.
385
389
* @returns {string } Content of the file as JSON object.
386
390
*/
387
391
readJson ( filename : string , encoding ?: string ) : any ;
@@ -498,7 +502,7 @@ interface IFileSystem {
498
502
* or directory.
499
503
* @param {string } sourcePath The original path of the file/dir.
500
504
* @param {string } destinationPath The destination where symlink will be created.
501
- * @param {string } @optional type "file", "dir" or "junction". Default is 'file'.
505
+ * @param {string } type "file", "dir" or "junction". Default is 'file'.
502
506
* Type option is only available on Windows (ignored on other platforms).
503
507
* Note that Windows junction points require the destination path to be absolute.
504
508
* When using 'junction', the target argument will automatically be normalized to absolute path.
@@ -556,8 +560,8 @@ interface IFileSystem {
556
560
557
561
// shell.js wrappers
558
562
/**
559
- * @param ( string) options Options, can be undefined or a combination of "-r" (recursive) and "-f" (force)
560
- * @param ( string[]) files files and direcories to delete
563
+ * @param { string } options Options, can be undefined or a combination of "-r" (recursive) and "-f" (force)
564
+ * @param { string[] } files files and direcories to delete
561
565
*/
562
566
rm ( options : string , ...files : string [ ] ) : void ;
563
567
@@ -689,7 +693,11 @@ interface IChildProcess extends NodeJS.EventEmitter {
689
693
execOptions ?: IExecOptions
690
694
) : Promise < any > ;
691
695
execFile < T > ( command : string , args : string [ ] ) : Promise < T > ;
692
- spawn ( command : string , args ?: string [ ] , options ?: any ) : any ; // it returns child_process.ChildProcess you can safely cast to it
696
+ spawn (
697
+ command : string ,
698
+ args ?: string [ ] ,
699
+ options ?: any
700
+ ) : child_process . ChildProcess ; // it returns child_process.ChildProcess you can safely cast to it
693
701
spawnFromEvent (
694
702
command : string ,
695
703
args : string [ ] ,
@@ -987,7 +995,7 @@ interface IProxyLibSettings extends IRejectUnauthorized, ICredentials {
987
995
interface IProxyService {
988
996
/**
989
997
* Caches proxy data.
990
- * @param cacheData {IProxyLibSettings} Data to be cached.
998
+ * @param {IProxyLibSettings } settings Data to be cached.
991
999
* @returns {Promise<void> } The cache.
992
1000
*/
993
1001
setCache ( settings : IProxyLibSettings ) : Promise < void > ;
@@ -1039,14 +1047,14 @@ interface IHelpService {
1039
1047
1040
1048
/**
1041
1049
* Finds the html help for specified command and opens it in the browser.
1042
- * @param {IComandData } commandData Data describing searched command - name and arguments.
1050
+ * @param {ICommandData } commandData Data describing searched command - name and arguments.
1043
1051
* @returns {Promise<void> }
1044
1052
*/
1045
1053
openHelpForCommandInBrowser ( commandData : ICommandData ) : Promise < void > ;
1046
1054
1047
1055
/**
1048
1056
* Shows command line help for specified command.
1049
- * @param {string } commandName The name of the command for which to show the help.
1057
+ * @param {string } commandData The name of the command for which to show the help.
1050
1058
* @returns {Promise<void> }
1051
1059
*/
1052
1060
showCommandLineHelp ( commandData : ICommandData ) : Promise < void > ;
@@ -1159,6 +1167,7 @@ interface IHostInfo {
1159
1167
getMacOSVersion ( ) : Promise < string > ;
1160
1168
}
1161
1169
1170
+ // tslint:disable-next-line:interface-name
1162
1171
interface GenericFunction < T > extends Function {
1163
1172
( ...args : any [ ] ) : T ;
1164
1173
}
@@ -1312,8 +1321,8 @@ interface IDoctorService {
1312
1321
runSetupScript ( ) : Promise < ISpawnResult > ;
1313
1322
/**
1314
1323
* Checks if the envrironment is properly configured and it is possible to execute local builds
1315
- * @param platform @optional The current platform
1316
1324
* @returns {Promise<boolean> } true if the environment is properly configured for local builds
1325
+ * @param {object } configuration
1317
1326
*/
1318
1327
canExecuteLocalBuild ( configuration ?: {
1319
1328
platform ?: string ;
@@ -1353,8 +1362,8 @@ interface IUserSettingsService extends IJsonFileSettingsService {
1353
1362
}
1354
1363
1355
1364
/**
1356
- * Used for interaction with various resources located in a resources folder.
1357
- * @interface
1365
+ * Used for interaction with various resources located in a resources folder.
1366
+ * @interface
1358
1367
*/
1359
1368
interface IResourceLoader {
1360
1369
/**
@@ -1471,6 +1480,7 @@ interface IProjectFilesManager {
1471
1480
* Handle platform specific files.
1472
1481
* @param {string } directoryPath Directory from which to start looking for platform specific files. All subdirectories will be included.
1473
1482
* @param {string } platform Mobile platform - only platform specific files for this platform will be included.
1483
+ * @param {IProjectFilesConfig } projectFilesConfig
1474
1484
* @param {string[] } excludedDirs Directories which should be skipped.
1475
1485
* @returns {void }
1476
1486
*/
@@ -1512,6 +1522,7 @@ interface IProjectFilesProvider {
1512
1522
/**
1513
1523
* Parses file by removing platform or configuration from its name.
1514
1524
* @param {string } filePath Path to the project file.
1525
+ * @param {IProjectFilesConfig } projectFilesConfig
1515
1526
* @return {string } Parsed file name or original file name in case it does not have platform/configuration in the filename.
1516
1527
*/
1517
1528
getPreparedFilePath (
@@ -1600,7 +1611,7 @@ interface INet {
1600
1611
/**
1601
1612
* Returns the first available port in the provided range.
1602
1613
* @param {number } startPort the first port to check.
1603
- * @param {number } @optional endPort the last port to check. The default value is 65534.
1614
+ * @param {number } endPort the last port to check. The default value is 65534.
1604
1615
* @return {Promise<number> } returns the first available prot in the given range.
1605
1616
*/
1606
1617
getAvailablePortInRange ( startPort : number , endPort ?: number ) : Promise < number > ;
@@ -1674,6 +1685,7 @@ interface IDeferPromise<T> extends IPromiseActions<T> {
1674
1685
/**
1675
1686
* Describes service used for interaction with Notification Center
1676
1687
*/
1688
+ // tslint:disable-next-line:interface-name
1677
1689
interface IiOSNotificationService {
1678
1690
/**
1679
1691
* Posts a notification and waits for a response.
@@ -1692,7 +1704,7 @@ interface IiOSNotificationService {
1692
1704
* Posts a notification.
1693
1705
* @param {string } deviceIdentifier Device's identifier.
1694
1706
* @param {string } notification The xml value of the Name key of the notification to be post.
1695
- * @param {string } @optional commandType The xml value of the Command key of the notification to be post.
1707
+ * @param {string } commandType The xml value of the Command key of the notification to be post.
1696
1708
* @return {Promise<number> } A socket which can be queried for a response.
1697
1709
*/
1698
1710
postNotification (
0 commit comments