@@ -61,7 +61,7 @@ module.exports.getBoolInput = task.getBoolInput;
61
61
module . exports . getDelimitedInput = task . getDelimitedInput ;
62
62
module . exports . filePathSupplied = task . filePathSupplied ;
63
63
64
- function getPathInput ( name , required , check ) {
64
+ function getPathInput ( name : string , required ?: boolean , check ?: boolean ) : string {
65
65
var inval = module . exports . getInput ( name , required ) ;
66
66
if ( inval ) {
67
67
if ( check ) {
@@ -100,52 +100,52 @@ module.exports.getSecureFileTicket = task.getSecureFileTicket;
100
100
//-----------------------------------------------------
101
101
102
102
export class FsStats implements fs . Stats {
103
- private m_isFile : boolean ;
104
- private m_isDirectory : boolean ;
105
- private m_isBlockDevice : boolean ;
106
- private m_isCharacterDevice : boolean ;
107
- private m_isSymbolicLink : boolean ;
108
- private m_isFIFO : boolean ;
109
- private m_isSocket : boolean ;
110
-
111
- dev : number ;
112
- ino : number ;
113
- mode : number ;
114
- nlink : number ;
115
- uid : number ;
116
- gid : number ;
117
- rdev : number ;
118
- size : number ;
119
- blksize : number ;
120
- blocks : number ;
121
- atime : Date ;
122
- mtime : Date ;
123
- ctime : Date ;
124
- birthtime : Date ;
125
-
126
- setAnswers ( mockResponses ) {
127
- this . m_isFile = mockResponses [ 'isFile' ] || false ;
128
- this . m_isDirectory = mockResponses [ 'isDirectory' ] || false ;
129
- this . m_isBlockDevice = mockResponses [ 'isBlockDevice' ] || false ;
130
- this . m_isCharacterDevice = mockResponses [ 'isCharacterDevice' ] || false ;
131
- this . m_isSymbolicLink = mockResponses [ 'isSymbolicLink' ] || false ;
132
- this . m_isFIFO = mockResponses [ 'isFIFO' ] || false ;
133
- this . m_isSocket = mockResponses [ 'isSocket' ] || false ;
134
-
135
- this . dev = mockResponses [ 'dev' ] ;
136
- this . ino = mockResponses [ 'ino' ] ;
137
- this . mode = mockResponses [ 'mode' ] ;
138
- this . nlink = mockResponses [ 'nlink' ] ;
139
- this . uid = mockResponses [ 'uid' ] ;
140
- this . gid = mockResponses [ 'gid' ] ;
141
- this . rdev = mockResponses [ 'rdev' ] ;
142
- this . size = mockResponses [ 'size' ] ;
143
- this . blksize = mockResponses [ 'blksize' ] ;
144
- this . blocks = mockResponses [ 'blocks' ] ;
145
- this . atime = mockResponses [ 'atime' ] ;
146
- this . mtime = mockResponses [ 'mtime' ] ;
147
- this . ctime = mockResponses [ 'ctime' ] ;
148
- this . m_isSocket = mockResponses [ 'isSocket' ] ;
103
+ private m_isFile : boolean = false ;
104
+ private m_isDirectory : boolean = false ;
105
+ private m_isBlockDevice : boolean = false ;
106
+ private m_isCharacterDevice : boolean = false ;
107
+ private m_isSymbolicLink : boolean = false ;
108
+ private m_isFIFO : boolean = false ;
109
+ private m_isSocket : boolean = false ;
110
+
111
+ dev : number = 0 ;
112
+ ino : number = 0 ;
113
+ mode : number = 0 ;
114
+ nlink : number = 0 ;
115
+ uid : number = 0 ;
116
+ gid : number = 0 ;
117
+ rdev : number = 0 ;
118
+ size : number = 0 ;
119
+ blksize : number = 0 ;
120
+ blocks : number = 0 ;
121
+ atime : Date = new Date ( ) ;
122
+ mtime : Date = new Date ( ) ;
123
+ ctime : Date = new Date ( ) ;
124
+ birthtime : Date = new Date ( ) ;
125
+
126
+ setAnswers ( mockResponses : any ) : void {
127
+ this . m_isFile = mockResponses [ 'isFile' ] || this . m_isFile ;
128
+ this . m_isDirectory = mockResponses [ 'isDirectory' ] || this . m_isDirectory ;
129
+ this . m_isBlockDevice = mockResponses [ 'isBlockDevice' ] || this . m_isBlockDevice ;
130
+ this . m_isCharacterDevice = mockResponses [ 'isCharacterDevice' ] || this . m_isCharacterDevice ;
131
+ this . m_isSymbolicLink = mockResponses [ 'isSymbolicLink' ] || this . m_isSymbolicLink ;
132
+ this . m_isFIFO = mockResponses [ 'isFIFO' ] || this . m_isFIFO ;
133
+ this . m_isSocket = mockResponses [ 'isSocket' ] || this . m_isSocket ;
134
+
135
+ this . dev = mockResponses [ 'dev' ] || this . dev ;
136
+ this . ino = mockResponses [ 'ino' ] || this . ino ;
137
+ this . mode = mockResponses [ 'mode' ] || this . mode ;
138
+ this . nlink = mockResponses [ 'nlink' ] || this . nlink ;
139
+ this . uid = mockResponses [ 'uid' ] || this . uid ;
140
+ this . gid = mockResponses [ 'gid' ] || this . gid ;
141
+ this . rdev = mockResponses [ 'rdev' ] || this . rdev ;
142
+ this . size = mockResponses [ 'size' ] || this . size ;
143
+ this . blksize = mockResponses [ 'blksize' ] || this . blksize ;
144
+ this . blocks = mockResponses [ 'blocks' ] || this . blocks ;
145
+ this . atime = mockResponses [ 'atime' ] || this . atime ;
146
+ this . mtime = mockResponses [ 'mtime' ] || this . mtime ;
147
+ this . ctime = mockResponses [ 'ctime' ] || this . ctime ;
148
+ this . m_isSocket = mockResponses [ 'isSocket' ] || this . m_isSocket ;
149
149
}
150
150
151
151
isFile ( ) : boolean {
@@ -354,13 +354,10 @@ export function findMatch(defaultRoot: string, patterns: string[] | string) : st
354
354
// Test Publisher
355
355
//-----------------------------------------------------
356
356
export class TestPublisher {
357
- constructor ( testRunner ) {
358
- this . testRunner = testRunner ;
357
+ constructor ( public testRunner : string ) {
359
358
}
360
359
361
- public testRunner : string ;
362
-
363
- public publish ( resultFiles , mergeResults , platform , config , runTitle , publishRunAttachments ) {
360
+ public publish ( resultFiles ?: string , mergeResults ?: string , platform ?: string , config ?: string , runTitle ?: string , publishRunAttachments ?: string ) {
364
361
365
362
var properties = < { [ key : string ] : string } > { } ;
366
363
properties [ 'type' ] = this . testRunner ;
@@ -399,7 +396,7 @@ export class TestPublisher {
399
396
export class CodeCoveragePublisher {
400
397
constructor ( ) {
401
398
}
402
- public publish ( codeCoverageTool , summaryFileLocation , reportDirectory , additionalCodeCoverageFiles ) {
399
+ public publish ( codeCoverageTool ?: string , summaryFileLocation ?: string , reportDirectory ?: string , additionalCodeCoverageFiles ?: string ) {
403
400
404
401
var properties = < { [ key : string ] : string } > { } ;
405
402
@@ -452,13 +449,13 @@ exports.ToolRunner = trm.ToolRunner;
452
449
//-----------------------------------------------------
453
450
// Http Proxy Helper
454
451
//-----------------------------------------------------
455
- export function getHttpProxyConfiguration ( requestUrl ?: string ) : task . ProxyConfiguration {
452
+ export function getHttpProxyConfiguration ( requestUrl ?: string ) : task . ProxyConfiguration | null {
456
453
return null ;
457
454
}
458
455
459
456
//-----------------------------------------------------
460
457
// Http Certificate Helper
461
458
//-----------------------------------------------------
462
- export function getHttpCertConfiguration ( ) : task . CertConfiguration {
459
+ export function getHttpCertConfiguration ( ) : task . CertConfiguration | null {
463
460
return null
464
461
}
0 commit comments