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 {
55 DECODE = "decode" ,
66}
77
8+ export interface IBase64Config {
9+ action ?: Base64Actions ;
10+ }
11+
812export class Base64 implements IMapper {
913 static ident : string = "BASE64" ;
1014 static description : string = "Base64" ;
@@ -14,7 +18,7 @@ export class Base64 implements IMapper {
1418
1519 constructor ( {
1620 action = Base64Actions . DECODE ,
17- } = { } ) {
21+ } : IBase64Config = { } ) {
1822 this . action = action ;
1923 }
2024
Original file line number Diff line number Diff line change 11import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
22
3+ export interface IFromJSONConfig {
4+ propertyString ?: string ;
5+ }
6+
37export class FromJSON implements IMapper {
48 static ident : string = "FROMJSON" ;
59 static description : string = "JSON" ;
@@ -9,7 +13,7 @@ export class FromJSON implements IMapper {
913
1014 constructor ( {
1115 propertyString = "" ,
12- } = { } ) {
16+ } : IFromJSONConfig = { } ) {
1317 this . propertyString = propertyString ;
1418 }
1519
Original file line number Diff line number Diff line change 1-
21import { Endianness } from "../Config" ;
32import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
43
4+ export interface IHexToFloatConfig {
5+ endianness ?: Endianness ;
6+ }
7+
58export class HexToFloat implements IMapper {
69 static ident : string = "HEXTOFLOAT" ;
710 static description : string = "Hex to float" ;
@@ -11,7 +14,7 @@ export class HexToFloat implements IMapper {
1114
1215 constructor ( {
1316 endianness = Endianness . BIG_ENDIAN ,
14- } = { } ) {
17+ } : IHexToFloatConfig = { } ) {
1518 this . endianness = endianness ;
1619 }
1720
Original file line number Diff line number Diff line change 11import { Endianness } from "../Config" ;
22import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
33
4+ export interface IHexToIntConfig {
5+ endianness ?: Endianness ;
6+ signed ?: boolean ;
7+ }
8+
49export class HexToInt implements IMapper {
510 static ident : string = "HEXTOINT" ;
611 static description : string = "Hex to int" ;
@@ -13,7 +18,7 @@ export class HexToInt implements IMapper {
1318 constructor ( {
1419 endianness = Endianness . BIG_ENDIAN ,
1520 signed = false ,
16- } = { } ) {
21+ } : IHexToIntConfig = { } ) {
1722 this . endianness = endianness ;
1823 this . signed = signed ;
1924 }
Original file line number Diff line number Diff line change 11import { IDataValue , IMapper , IMapperConfig } from "./../Models" ;
22
3+ export interface IOffsetConfig {
4+ offset ?: number | string ;
5+ }
6+
37export class Offset implements IMapper {
48 static ident : string = "OFFSET" ;
59 static description : string = "Offset number" ;
@@ -8,7 +12,7 @@ export class Offset implements IMapper {
812
913 constructor ( {
1014 offset = "0" ,
11- } = { } ) {
15+ } : IOffsetConfig = { } ) {
1216 this . offset = parseInt ( offset . toString ( ) , 10 ) ;
1317 }
1418
You can’t perform that action at this time.
0 commit comments