This repository was archived by the owner on Jul 20, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +26
-6
lines changed Expand file tree Collapse file tree 5 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ export enum Base64Actions {
5
5
DECODE = "decode" ,
6
6
}
7
7
8
+ export interface IBase64Config {
9
+ action ?: Base64Actions ;
10
+ }
11
+
8
12
export class Base64 implements IMapper {
9
13
static ident : string = "BASE64" ;
10
14
static description : string = "Base64" ;
@@ -14,7 +18,7 @@ export class Base64 implements IMapper {
14
18
15
19
constructor ( {
16
20
action = Base64Actions . DECODE ,
17
- } = { } ) {
21
+ } : IBase64Config = { } ) {
18
22
this . action = action ;
19
23
}
20
24
Original file line number Diff line number Diff line change 1
1
import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
2
2
3
+ export interface IFromJSONConfig {
4
+ propertyString ?: string ;
5
+ }
6
+
3
7
export class FromJSON implements IMapper {
4
8
static ident : string = "FROMJSON" ;
5
9
static description : string = "JSON" ;
@@ -9,7 +13,7 @@ export class FromJSON implements IMapper {
9
13
10
14
constructor ( {
11
15
propertyString = "" ,
12
- } = { } ) {
16
+ } : IFromJSONConfig = { } ) {
13
17
this . propertyString = propertyString ;
14
18
}
15
19
Original file line number Diff line number Diff line change 1
-
2
1
import { Endianness } from "../Config" ;
3
2
import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
4
3
4
+ export interface IHexToFloatConfig {
5
+ endianness ?: Endianness ;
6
+ }
7
+
5
8
export class HexToFloat implements IMapper {
6
9
static ident : string = "HEXTOFLOAT" ;
7
10
static description : string = "Hex to float" ;
@@ -11,7 +14,7 @@ export class HexToFloat implements IMapper {
11
14
12
15
constructor ( {
13
16
endianness = Endianness . BIG_ENDIAN ,
14
- } = { } ) {
17
+ } : IHexToFloatConfig = { } ) {
15
18
this . endianness = endianness ;
16
19
}
17
20
Original file line number Diff line number Diff line change 1
1
import { Endianness } from "../Config" ;
2
2
import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
3
3
4
+ export interface IHexToIntConfig {
5
+ endianness ?: Endianness ;
6
+ signed ?: boolean ;
7
+ }
8
+
4
9
export class HexToInt implements IMapper {
5
10
static ident : string = "HEXTOINT" ;
6
11
static description : string = "Hex to int" ;
@@ -13,7 +18,7 @@ export class HexToInt implements IMapper {
13
18
constructor ( {
14
19
endianness = Endianness . BIG_ENDIAN ,
15
20
signed = false ,
16
- } = { } ) {
21
+ } : IHexToIntConfig = { } ) {
17
22
this . endianness = endianness ;
18
23
this . signed = signed ;
19
24
}
Original file line number Diff line number Diff line change 1
1
import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
2
2
3
+ export interface IOffsetConfig {
4
+ offset ?: number | string ;
5
+ }
6
+
3
7
export class Offset implements IMapper {
4
8
static ident : string = "OFFSET" ;
5
9
static description : string = "Offset number" ;
@@ -8,7 +12,7 @@ export class Offset implements IMapper {
8
12
9
13
constructor ( {
10
14
offset = "0" ,
11
- } = { } ) {
15
+ } : IOffsetConfig = { } ) {
12
16
this . offset = parseInt ( offset . toString ( ) , 10 ) ;
13
17
}
14
18
You can’t perform that action at this time.
0 commit comments