1
1
import { sep } from 'path' ;
2
2
3
3
class Client {
4
+ public portNumber : number ;
5
+ public host : string ;
6
+
4
7
constructor ( portNumber = 23517 , host = 'localhost' ) {
5
8
this . portNumber = portNumber ;
6
9
@@ -9,13 +12,13 @@ class Client {
9
12
}
10
13
11
14
export class FakeClient extends Client {
12
- sentRequests = [ ] ;
15
+ public sentRequests : any [ ] = [ ] ;
13
16
14
- async send ( request ) {
15
- const requestProperties = request . toArray ( ) ;
17
+ async send ( request : any ) {
18
+ const requestProperties : any = request . toArray ( ) ;
16
19
const payloads = request . payloads ;
17
20
18
- payloads . map ( payload => {
21
+ payloads . map ( ( payload : any ) => {
19
22
payload . toArray ( ) ;
20
23
21
24
const fn = payload . data . origin . file ?? '/test/file.js' ;
@@ -47,7 +50,7 @@ export class FakeClient extends Client {
47
50
}
48
51
49
52
// eslint-disable-next-line no-unused-vars
50
- async lockExists ( lockName ) {
53
+ async lockExists ( lockName : any ) {
51
54
return new Promise ( resolve => {
52
55
resolve ( { active : false , stop_exectution : true } ) ;
53
56
} ) ;
@@ -67,7 +70,7 @@ export class FakeClient extends Client {
67
70
return __dirname . replace ( '/tests/TestClasses' , '' ) ;
68
71
}
69
72
70
- convertToUnixPath ( path ) {
73
+ convertToUnixPath ( path : string ) {
71
74
path = path . replace ( 'D:\\a\\ray\\ray' , '' ) ;
72
75
73
76
return path . replace ( sep , '/' ) ;
0 commit comments